Here is what i haveDBryant wrote:Are you sure cron is running:
ps -lef | grep cron
Try starting it:
sudo service cron start
If there any activity in your log files to indicate a problem?
You are aware that the environment cron jobs run in is very limited? The users PATH is not available to full paths have to be specified.
You should always use crontab -e to edit files, cron is touchy about its format.
Code: Select all
pi@raspberrypi ~ $ ps -lef | grep cron
5 S root 3568 1 0 80 0 - 955 hrtime 12:57 ? 00:00:00 /usr/sbin/cron
0 S pi 8152 8137 0 80 0 - 885 pipe_w 13:49 pts/0 00:00:00 grep --color=auto cron
pi@raspberrypi ~ $ service cron status
[ ok .] cron is running.
pi@raspberrypi ~ $ #Code: Select all
# m h dom mon dow command
00 00 * * * root ntpd -qg
58 05 * * * root pkill oscam
57 05 * * * root /var/script/configupdate.sh
58 05 * * * root /var/script/keyupdater.sh
59 05 * * * root /usr/local/bin/oscam -b -c /var/etc/config
*/6 * * * * root /var/script/OscamCheck.sh
05 06 * * 7 root /var/script/LogCleanUp.sh >> /var/camlogs/CleanUp.log
00 00 1 * * root rm /var/camlogs/cleanup.log
Code: Select all
#*/5 * * * * /home/pi/scripts/test.sh >> /home/pi/scripts/test.logCode: Select all
#!/bin/bash
cat << END_INTRO
...oooOOO Test script OOOooo...
Date: $(date)
User: $(who am i)
Path: ${PATH}
END_INTRO
printf "test.sh: At $(date)\n" >> ./test.log
exit 0Code: Select all
# m h dom mon dow command
00 00 * * * pi ntpd -qg
55 05 * * * pi pkill oscam
56 05 * * * /home/pi/scripts/configupdate.sh
57 05 * * * /home/pi/scripts/keyupdater.sh
58 05 * * * pi /usr/local/bin/oscam -b -c /var/etc/config
*/6 * * * * /home/pi/scripts/OscamCheck.sh
05 06 * * 7 /home/pi/scripts/LogCleanUp.sh >> /var/camlogs/CleanUp.log
00 00 1 * * pi rm /var/camlogs/cleanup.log
Compare the format of these lines in your crontab with the other lines - the ones that work.silverfox0786 wrote:the 1st, 2nd,5th, and 8th cron dont deploy as they are commands
Code: Select all
55 05 * * * pi pkill oscam
56 05 * * * /home/pi/scripts/configupdate.sh
Code: Select all
# m h dom mon dow user command
Code: Select all
# m h dom mon dow command
RaTTuS wrote:crontabs for users
login as user
crontab -e
or
sudo crontab -e -u user