foxfirefey: A guy looking ridiculous by doing a fashionable posing with a mouse, slinging the cord over his shoulders. (geek)
[personal profile] foxfirefey posting in [community profile] command_liners
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!

Date: 2010-01-02 12:35 am (UTC)
sophie: A cartoon-like representation of a girl standing on a hill, with brown hair, blue eyes, a flowery top, and blue skirt. ☀ (Default)
From: [personal profile] sophie
"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.

Date: 2010-01-02 05:17 am (UTC)
zorkian: Icon full of binary ones and zeros in no pattern. (Default)
From: [personal profile] zorkian
I did not know that was the exact definition! Neat.

Date: 2010-01-02 07:43 pm (UTC)
sophie: A cartoon-like representation of a girl standing on a hill, with brown hair, blue eyes, a flowery top, and blue skirt. ☀ (Default)
From: [personal profile] sophie
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...

Date: 2010-04-04 10:15 am (UTC)
pauamma: Cartooney crab wearing hot pink and acid green facemask holding drink with straw (Default)
From: [personal profile] pauamma
Is the /15 thing standard? I thought it was a Vixie cron extension.

Profile

command_liners: A command line prompt with a blinking cursor after it, green against black. (Default)
Command Liners

January 2022

S M T W T F S
      1
2 345678
9101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 9th, 2025 03:08 pm
Powered by Dreamwidth Studios