foxfirefey: A guy looking ridiculous by doing a fashionable posing with a mouse, slinging the cord over his shoulders. (geek)
foxfirefey ([personal profile] foxfirefey) wrote in [community profile] command_liners2010-01-01 01:48 am

Cron Sandbox

cron is a time based job scheduler in *nix systems that lets you run a given command at specified times. I just had to compose a chron entry, and found this Cron Sandbox that lets me enter in the values I'm trying to use for specifying the times to run the command (every fifteen minutes turned out to be 0,15,30,45 * * * *). It was really helpful, because I'm not very experienced with cron as I've only had to ever use it a couple of times. Once you set it up, it just keeps chugging along without needing much maintenance!
sophie: A cartoon-like representation of a girl standing on a hill, with brown hair, blue eyes, a flowery top, and blue skirt. ☀ (Default)

[personal profile] sophie 2010-01-02 12:35 am (UTC)(link)
"Every 15 minutes" can also be done as */15 * * * *

But there's a catch to the above - it doesn't actually mean "every 15 minutes", but it means "Each minute that can be divided by 15, but including 0". In other words, it expands to 0,15,30,45 * * * *.

It also means that */25 * * * * expands into 0,25,50 * * * *. You'll notice that this would mean that the cron job will get executed at, for example, 10:00, 10:25, 10:50, 11:00, 11:25... instead of every 25 minutes as you'd expect. (There are only 10 minutes between 10:50 and 11:00.)

This comment has been brought to you by Painful Experience, Inc.
zorkian: Icon full of binary ones and zeros in no pattern. (Default)

[personal profile] zorkian 2010-01-02 05:17 am (UTC)(link)
I did not know that was the exact definition! Neat.
sophie: A cartoon-like representation of a girl standing on a hill, with brown hair, blue eyes, a flowery top, and blue skirt. ☀ (Default)

[personal profile] sophie 2010-01-02 07:43 pm (UTC)(link)
Yeah, a lot of people probably don't notice it because people tend to use factors of 60 anyway - */5, */10, */15 and */30 probably being the most common. (Of course, there are others.) I just had to be the one to use one that *isn't* a factor...
pauamma: Cartooney crab wearing hot pink and acid green facemask holding drink with straw (Default)

[personal profile] pauamma 2010-04-04 10:15 am (UTC)(link)
Is the /15 thing standard? I thought it was a Vixie cron extension.