Crontab

Hello all

I have one simple question, and I am really embarrassed :r

How to run a script from crontab 5 minutes past the hour. I am running a zfs pool and I use zfs-periodic to create the snapshots every hour, this works wonders. But I want to send them over after the snapshots are taken. If I use the hourly method, but then sometimes the zfs send script starts before the snapshots have been done, so I want it to start every hour but 5 or maybe even one minute after the hour.

thanks for your time
regards
 
That's actually really easy:
Code:
# Minutes      hour    mday   month    wday    command
 5              *       *       *       *        /some/command

The 5 minutes tells it to run when the clock shows 5 minutes, everything else is a wildcard so it runs every weekday (wday) of every month on every day of the month (mday) and every hour.
 
That would work if you use your own crontab (crontab -e), otherwise you shoud add the user which will run the command :


Code:
# Minutes      hour    mday   month    wday  user  command
 5              *       *       *       *    toto   /some/command
 
Shame on me, I used */5 in the minute field which did run it every 5 minutes.

Sometimes you tend to think much more complicated that things are.

thanks!

BTW i always use crontab -e to add jobs to the crontab even as root.

gr
johan
 
Back
Top