Alvin Alexander | Java, Scala, Unix, Perl, Mac OS X

Table of Contents1 - Linux crontab: How to run a command every minute2 - Meaning of the crontab date/time fields3 - Run a crontab command every hour4 - Run a crontab entry every day5 - Run a crontab entry every 5 minutes6 - Unix and Linux “crontab every” summary7 - Unix and Linux crontab reference information

Linux crontab FAQ: How do I schedule Unix or Linux crontab jobs to run at intervals, like “Every five minutes,” “Every ten minutes,” “Every half hour,” and so on?

Solution: I’ve posted other Unix and Linux crontab tutorials here before (How to edit your Linux crontab file, Example Linux crontab file format), but I’ve never included a tutorial that covers the “every” options, so here are some examples to demonstrate this crontab syntax.

“A little progress every day can add up to big results.”

(Think of the proverbial snowball rolling down a mountain.)

If you add ScalaCheck to an SBT project like this:

libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.13.4" % "test"

it’s only available in the SBT “test” scope. This means that when you start a Scala REPL session inside of SBT with its console command, the ScalaCheck library won’t be available in that scope.

To use ScalaCheck with the SBT console (REPL), don’t use its console command — use test:console instead. A complete example looks like this:

$ sbt

> test:console

scala> import org.scalacheck.Gen.choose

Note that after you type test:console your project may be compiled, so that step may take a few moments.

In summary, use SBT’s console command to start a “normal” Scala REPL inside SBT, and use test:console to start a REPL that you can run tests inside of. (Note that this same advice also applies to using ScalaTest or specs2.)

“I’ve seen a lot of my friends lose their passion and end up in a rut, afraid to take a chance. ‘Night Moves’ is about romantic passion, but ‘Ship of Fools’ is about passion for life. Maybe a guy’s working a job he doesn’t like, and he sees an ad about the Alaska pipeline or something that excites him. But there are problems. His family says it’s too cold in Alaska or whatever. So he passes it up and just keeps on with something he hates.”

~ From Bob Seger, about his song, Ship of Fools

“Even when I was just three years old, I could recall many previous lives. But to many people this sort of thinking isn’t acceptable, so now when I’m asked what I can remember, I just say ‘I remember when I was three years old.’”

~ a monk

When I meet people who seem stressed out (stress/anxiety/worrying), I try to encourage them to practice mindfulness meditation or yoga. I find both of those practices to be a wonderful way to quiet the thoughts in the mind. (It may help to know that the basic practices are 100% non-religious.)

Personally, I enjoy living in the present moment, without thoughts about the past or future. I used to be an angry young man, and using these practices to calm my mind has made my life happier and more productive. A couple of times a year I still lose it, but these practices always help to re-quiet my mind.

(I think the image shown was created by Gemma Correll.)

Practicing mindfulness meditation and yoga to calm the mind

A Facebook post from March 22, 2010, when I was stranded in a small town in Canada:

How neat, the “Court Circuit” comes to town tonight. Just like the Northern Exposure episode, the court people travel around and temporarily set up court in various towns. They are expected to be here from tonight until Thursday. My chance to meet many police officers! (RCMPs, I wonder?)

“I suffered, I learned, I changed.” I found this image on this Pinterest page, and it reminds me of the learning process in general, but mostly of learning about our own minds, feelings, and emotions.

I suffered, I learned, I changed

To me, a lot of Buddhist teachings are based on logic. Today I particularly like this quote from this LionsRoar.com article titled, Silencing the Inner Critic: “The judging mind is optional; it can be understood and released.”

It always amazes me how the brain works. I got to hear these lyrics from the Alanis Morissette song, Thank U, in a dream last night:

How bout no longer being masochistic
How bout remembering your divinity

“President’s spokesman can’t speak for the President.” *sigh*

President’s spokesman can’t speak for the President

If you happen to be looking for the free, HTML version of my book on Scala and functional programming, I’m currently in the process of moving it to this website. That way you (and I) can search it more easily, along with several hundred other pages I’ve written about programming in Scala. The first page of the content is available here: Learning Functional Programming in Scala.

On the same day the president of the United States decided to ignore that whole science thing and opt out of the Paris Agreement, a gigantic iceberg the size of Delaware is about to break off from one of the largest ice shelves in Antartica.

If you ever need to drive from the Boulder/Denver, Colorado area to (or from) Santa Fe, New Mexico, the gray route on the left in this image is the most scenic, the one to take if you only get one shot at it. Lots of mountain views and ranches, and many small towns.

Once you get off of I-25, the blue road that goes through Taos is also very scenic, and is particularly pretty in the winter. I usually take the gray road back to Colorado, and the Taos road down to Santa Fe.

#MeepMeep

Driving from Boulder, Colorado to Santa Fe, New Mexico

I was having a metaphor in a dream this morning and I had to stop it and say, “Really? Aren’t we past this point by now? Pfft.”

(A note from June 1, 2014)

A wee bit of cause and effect:

I may never have lived in Alaska
if I didn't first go there on vacation.

I may have never gone to Alaska on vacation
if Colorado wasn't on fire in 2002.

I may not have thought to go to Alaska in 2002
if I hadn't discovered Northern Exposure ~1996.

I may never have discovered Northern Exposure
if I didn't quit a job I didn't like in 1995.

I may never have discovered Northern Exposure if a tv channel
that doesn't exist today hadn't aired it back then.

This keeps going back in time until I was born (or before then),
but that's the basic idea.

Here’s a link to a page by James Earl Douglas that I don’t quite understand yet, but also don’t want to forget. Here’s his intro to the problem, and then the image shows his solution.

Problem: You have a mutable variable (a var in Scala) that is both read from and written to outside of a tightly-scoped block.

Solution: Remodel the block as functions that take an initial value of the variable, and return both the final value of the variable and the original return value of the expression.

Joining multiple StateRefs together in a 'for' expression

This article titled, Little things I like to do with git, has a fun series of git commands.

Fun git commands