Doing it straight from command-line works fine and it displays in syslog that it fired just fine.
But it just simply doesn't work from cron. In fact trying to launch anything (like conky for instance) just plain doesn't work.
Thanks for your help though.
I also tried putting the command in an external file and launching that, and that didn't work.
I tried calling the external file using sh (inside cron) and that didn't work.
I even tried launching a command using the 'at' command (completely outside of cron) and even THAT didn't work.
What the heck am I doing wrong that my computer won't let me do absolutely anything dealing with time?
Edit: I was also told to grep the 'env' command for command, and it turned out to be :0.0, so I tried that and that doesn't work.
Last edited by jake3988; November 15th, 2008 at 10:39 PM.
I thank the creator of this post for their specific, succinct, accurate, and lucid explanation of a Linux feature which has entailed a great difficulty for me.
After reading this post, I finally used this command rightly.
Linux 2.6.31-20-generic; 9.10 WARNING: Do NOT take this user seriously!
MSI GD65; i5 750; 4 GB DDR3; GeForce 9500 GT
: Volume control buttons crash Gnome
Then you should have a file 'crontest' in your home directory with a modification date of when cron ran...Code:* * * * * /usr/bin/touch /home/[your user]/crontest
If this works, then you'll at least have narrowed it down to something having to do with your graphical system.
I've an issue with the failure messages cron sends out.
They should be going to root@laptop but they end up in:instead of root's mailbox.Code:/var/mail/nobody
I've a few cron errors going toand those are ok. Well i can deal with them using alpine.Code:/var/mail/<my username>
where do i change the email so it sends it to my username or root instead of going to nobody? (which i assume is due to the fact that root is dissabled as a logon user).
"Have you found the secrets of the universe? Asked Zebade "I'm sure I left them here somewhere" User numbers: Ubuntu 23772 Linux 477911
Last edited by chenel; November 24th, 2008 at 06:53 PM.
Thanks for such a brilliant how-to.
Maybe this is a silly question, but I'd be very grateful if one of the many gurus on this forum could confirm this for me...
As I understand it:
should send STDOUT and STDERR to null and thus supress all emails. Whereas:Code:0 * * * * * command > /dev/null 2>&1 #Comment
should send only STDOUT to /dev/null. Would STDERR still go to an email in this case? And would I, therefore, get an email if the job failed?Code:0 * * * * * command > /dev/null #Comment
I can't get crontab to work under su.
I've setup a script to run under my normal login and it works ok. However, when I change to root and use exactly the same cron parameters, it doesn't trigger.
the cron I use in both instances is:
35 23 * * * python /home/myname/test.py
The test.py file creates a txt doc with the current date and time. I've tried moving the test.py file out into the /tmp/ directory but that doesn't make any difference. I've changed the permissions on the file for all to read and write.
Am I just stupid?