Click to See Complete Forum and Search --> : Default Gentoo cron jobs don't work
crow2icedearth
04-28-2006, 12:47 PM
I have no clue why i can't get any cron job to work .
i make a cron.job file in /root with this
I have loaded cron.job as my cron file.
crontab -l
* * * * * echo "TESTING "
the problem is it sends a dead.letter in the root ~/
I tried vixie-cron as well as fcon.
vixie-cron process is running i make sure using ps aux | grep vixie.
knute
04-28-2006, 01:18 PM
Where are you expecting cron to do the echo anyway?
It's not like it's running on a specific terminal.
From Gentoo's Documentation on cron: (http://www.gentoo.org/doc/en/cron-guide.xml)
Note: You won't actually see the output from these echo commands unless you use redirection.
and further down (bottom of the page actually)
Troubleshooting
If you're having problems getting cron to work properly, you might want to go through this quick checklist.
Is cron running?
Run ps ax | grep cron and make sure it shows up!
Is cron working?
Try: * * * * * /bin/echo "foobar" >> /file_you_own and make sure it works
Is your command working?
Try: * * * * * /bin/foobar > /file_you_own 2>&1 and look for errors in /file_you_own
Can cron run your job?
Check the cron log, usually /var/log/cron.log or /var/log/messages for errors
Are there any dead.letter's?
:eek: cron usually sends mail when there's a problem, check your mail and also look for ~/dead.letter. :eek:
So, what does the dead.letter file say anyway?
crow2icedearth
04-28-2006, 08:44 PM
well examples i have shows that with out redirecting it.
crow2icedearth
04-28-2006, 08:50 PM
thanks. i guess that was the problem. i thought that echo redirects to the screen by default when using cron. thanks
crow2icedearth
04-28-2006, 09:11 PM
how would i echo it to the screen using cron ?
crow2icedearth
04-28-2006, 09:36 PM
Problem <Solved>. I was doing it all correct i guess cron takes a few minutes before i see result
echo "test" 2<&1 .
crow2icedearth
04-28-2006, 10:26 PM
now it doesnt' work . i have no clue how to get cron to echo it to screen. thanks
it does work with i
echo to tty1 . but i want a way to do it with std out.
knute
04-28-2006, 11:01 PM
I don't have a clue. What may be easier is that if your sound is working setup a sound to play or something as a test.
miteycasey
05-05-2006, 05:47 PM
Try this just to prove it's working.
* * * * * /bin/echo crow2icedearth >> /tmp/crow2icedearth
* * * * * /bin/date >> /tmp/crow2icedearth
then see if anything is output to /tmp/crow2icedearth