Help - Search - Members - Calendar
Full Version: Cron Problem
Linuxhelp > Support > Technical Support
chpant
Hi All,

I'm having a problem setting up the cron. I want to run fetchmail every 5 minutes, so I've set the following cron command:

5 * * * * fetchmail -v -f '/home/username_here/.fetchmailrc'

But it's not working sad.gif .

If I run this command (fetchmail -v -f '/home/username_here/.fetchmailrc') using shell, it works fine.

Please Help.

Thanks

Chandresh Pant
chpant
Hi All,

Found the solution through common sense smile.gif. This is the solution to my problem.

0,5,10,15,20,25,30,35,40,45,50,55 * * * * fetchmail -v -f '/home/username_here/.fetchmailrc'

Thanks
feef
Try putting a /sbin or /usr/local/bin infront of your fetchmail command like this :

5 * * * * /sbin/fetchmail -v -f '/home/username_here/.fetchmailrc'

Otherwise, do a tail -f /var/log/messages and see what error your cronjob has.

Hope it helps. smile.gif
hughesjr
YEP ....

This runs command at 5 minutes after every hour (00:05, 01:05, 02:05, etc.):
5 * * * * command

This one runs command every five minutes:
0,5,10,15,20,25,30,35,40,45,50,55 * * * * command
michaelk
Futhermore this also runs every 5 minutes
*/5 * * * * /command/to/execute
hughesjr
well yea michaelk ... if you want to do it the easy way tongue.gif

(Actually, I forgot that works as well ... thanks michael)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.