Crontab appears to not be working
Hey everybody.
I tried once to get my crontab working, because it seemed useful and cool; it didn't work.
At the time, when I tried to edit my crontab, nano would appear to be in some random folder in /tmp/[ahlphanumeric-crap]/filename.
I filled in the file at the time with a cp/backup command, and a command with output >> ~/text, e.g.
Code:
11 6 * * * collatz $(( $RANDOM % 20000 )) >> /home/bill/text
(Collatz is a bash script of my own making.) This was like April/May 2011, and I just checked, and there is no such file in my directory, despite the fact that the job is supposed to run daily. I also never saw the backup folder specified by the cp command I had in the file. The command I used was 'crontab -e'. I also tried 'sudo crontab -u root -e', but what I put in that file didn't work either.
The most remarkable thing is that despite being in /tmp/[alphanumeric-carp]/, when I just ran those commands today (9 months later) the crontab lines are still there, and still not doing anything.
So my questions are:
1) Why did crontab direct me to a file in /tmp?
2) Why (How?) did the file not change over 9 months, if it's in /tmp?
3) Why didn't the jobs run?
4) Should I instead directly edit /var/spool/cron/crontab, as in, would that actually work?
Last edited by Dubslow; March 1st, 2012 at 12:20 AM.
Intel Core i7-2600K (3.80 GHz) (Hyper 212+ Air Cooler)
MSI Twin Frozr II GTX 460 (768 MB)
Seagate 7200 RPM 1 TB && Hitachi 5400 RPM 2 TB
Ubuntu 11.04 Classic Desktop / Windows 7 Professional (games only)
Bookmarks