cron problems
anyone have any suggestions?
i'm having a hard time getting cron to work using ubuntu dapper server i tried using crontab -e as the user wg and adding the line: * * * * * wg /home/wg/ghostbin/test where the text of test is: #!/bin/sh echo "cron test" >> /home/wg/ghostbin/crontest.txt didnt work. then i changed to root and did tried the same thing with crontab -e. no good. i also tried puting test in /etc/cron.hourly, though i'd like more control over when it runs than that. but it didnt work anyway. i restarted cron. then stopped it & started it again. rebooted the machine. btw running 'echo "cron test" >> /home/wg/ghostbin/crontest.txt' at the command line does work. i'm not sure what else to try. any ideas? |
Make sure crontest.txt has execute permissions?
|
thanks for the suggestion
none of my other cronjobs are running either, this was just my simple test to try to isolate the problem but i'll try creating crontest.txt myself and manually setting the permissions. thanks! |
The syntax for a user's crontab is:
Code:
* * * * * /home/wg/ghostbin/test the problem. Check the logs. |
i tried chmod 777 crontest.txt and removing the username from the the crontab. neither worked.
which logs are you refering to? |
Quote:
Sorry: it's /home/wg/ghostbin/test not /home/wg/ghostbin/crontest.txt that should have execute perms. |
thank you for all your suggestions, i appreciate the time
/home/wg/ghostbin/test has the correct permissions because it runs ok from the command line. i didnt see /var/log/cron and when i checked /etc/syslog.conf, i found: #cron.* /var/log/cron.log daemon.* -/var/log/daemon.log kern.* -/var/log/kern.log so cron is commented out and doesnt have - in front of the directory like daemon and kern. weird. |
Just uncomment it and give syslogd a sighup:
Code:
kill -HUP `cat /var/run/syslogd.pid` |
All times are GMT -5. The time now is 10:13 PM. |