Cron job every few minutes ??

Eric Potter ecp62 at fastmail.fm
Sat Dec 25 20:36:16 UTC 2004


On Sat, 2004-12-25 at 21:05 +0100, Vincent Trouilliez wrote:
> I woud like to log CPU temperature every 5 minutes or so.
> I know abou the 'cron' daemon that runs dozen of jobs, but looking at
> directories in /etc/ and the crontab file, it looks as if you can run
> jobs every month, week, day, hour, but not every xx minutes.
> 
> Am I wrong, can cron be set up to do that ?
> I read the cron an page, and it says that it checks the cron files every
> minutes, so I guess that at least potentially, it is possible.
> 
A crontab file that looks like this should work:

0,6,12,18,24,30,36,42,48,54 * * * * 	command

or even:

*/5 * * * *	command

It's a good idea to use the full path to the command.




More information about the ubuntu-users mailing list