0

NOTE: I'm a big newbie when it comes to *nix.

I have a cron configuration that runs several programs. Most of them run once a day, and they're set at different times (2AM, 3AM, 4AM, etc) so they don't run all at the same time.

Now, I have a process that runs every 10 minutes, that always runs really fast (around 6 seconds), and it's getting "overlapped" with the 2AM, 3AM, 4AM, processes.

It's currently configured like this:

*/10 * * * * /home/blahblah

and it runs at 0, 10, 20, 30, 40, 50 minutes.

Would it be possible to have it run at "not 0", but displaced, for example, 5 minutes? Thus, it'd run at 5, 15, 25, 35, 45, 55 instead. Something like "*/10+5" if you will.

The idea is to simply avoid this process running at the same time as the ones that run at :00 minutes, and to still have it run approximately every 10 minutes.

Any ideas?

Thanks!
Daniel

3 Answers 3

3

You'd have to do this in your crontab:

5,15,25,35,45,55 * * * * /home/blahblah

That first part tells it to run at 5,15,...,45,55 minuites every hour of ever day of every month of every year

0
0

DUH, just found it...

8,18,28,38,48,58 * * * * /home/blahblah

Sorry about that.

0

You can use following line to run every 5,15,25,35,45, and 55th minutes

5-55/10 * * * * sh foobar.sh

This works Vixie cron which is default cron in most of operating systems.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .