Jorrick Sleijster
Jorrick Sleijster

Reputation: 1156

Crontab not working like it should

My crontab is not working right.. I don't know why, I first stumbled across the time being wrong but now I do date, then set it up 5 minutes ahead and 10 minutes later still nothing happened.. anyone any idea's?

My crontab:

0,10,20,30,40,50 * * * * /usr/local/bin/flexget -c "/home/user/NASDM/FlexGet/config.yml" --cron
01 08 * * * /usr/bin/find /home/user/USBHD/Movies/ -mtime '-1' -exec cp {} /home/user/NASVD/Movies \;
40 13 * * * PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/lib; perl /home/user/NASDM/unrar/unrar2.pl --conf="/home/user/NASDM/unrar/conf/unrar-data-conf.pl" --cmd=unrar
35 13 * * * /usr/bin/find /home/user/NASVD/Movies/ -iname "*sample*" -exec rm {} \;
36 13 * * * /usr/bin/find /home/user/NASVD/Series/ -iname "*sample*" -exec rm {} \;
[email protected]

I don't get an email neither.. If I execute every command in ssh it works great but when I let crontab do it it doens't do shit.. anyone any idea's???

I ran pgrep cron, this gives me back 2899..

I ran date before the crontab should work this gave me: Sat Jun 8 13:34:34 CEST 2013

I really don't get it where I go wrong.. Please any help is welcome!

NOTE: The first command works all the time every day every hour!! I never had to worry about flexget..

EDIT:::::::::: Found the problem! My cronjob/system date was 9 hours earlier then the normal date in debian. Don't know how this is possible but it doesn't matter since I now know it :)

Upvotes: 0

Views: 1013

Answers (3)

godfrey3835
godfrey3835

Reputation: 126

You can see syslog to find out what happened, seems like invalid command arguments or invalid crontab file format.

Upvotes: 1

Mladen B.
Mladen B.

Reputation: 3025

I believe the better approach would be to put your command lines into one file (bash script) and run that script instead of timing all your commands one after another. What would happen if one of the commands would last for too long and cron starts another command in the meantime?

Upvotes: 1

vszurma
vszurma

Reputation: 273

*/10 * * * /usr/local/bin/flexget -c

you had to much *

*/10 means "every 10 minutes"

better use crontab -e which informs you about syntax errors. Don't forget to reload cron.

Upvotes: 1

Related Questions