Click to See Complete Forum and Search --> : Running Something Every 2 Hours


Mikenell
12-01-2000, 06:31 PM
How can I run something every two hours? I would have used cron but you need to specify exact times and I don't want to do that I just want it to run every two hours, is there something I can add to my bash script to do it?
Thanks
Mikenell

Urko
12-01-2000, 09:25 PM
Look at cron more carefully it will run commands every two hours or try sleep()

[This message has been edited by Urko (edited 01 December 2000).]

X_console
12-01-2000, 10:26 PM
You can make cron run whenever you like. To make something run every 2 hours:

0 */2 * * * /usr/local/bin/foo

You'll want to check the man page for other recipies and there's an NHF on it.