Cron Job Not Running - Looks Like Cron Tried
Not a real newbie but still need some basic help here. Running Fedora, added a cron job in /etc/crontab. Did this with a simply "echo "hello" > hello.out previously to ensure that all was well. It was, I got the output. Then scheduled a "real" job for 6 AM this morning. It didn't run. Looked at other postings here, and found that I should check ps for "is cron running". Found /usr/sbin/crond -n
in the output. Found an entry in /var/log/cron that referenced my script at the right time. My script has a log that hasn't been touched though. Any ideas? |
dunno how big the script is, but if possible could you paste it here?
Might be something in the code. |
No, but I failed to mention that the script runs fine, as root, when I run it from a command prompt. It's not the script.
|
Ok, I was dumb. The script worked fine from a command prompt because I ran it from the right directory. Needed a "cd" in the script. Works now.
|
Looking at your "simple" cron job I would like to caution you to read up on shell scripting basics. While there's nothing wrong itself with a script like
Code:
echo "hello" > hello.out |
Well, that wasn't the actual script. Just "paraphrasing" as the purpose was to show that I was getting cron scripts to run. I've written literally hundreds over the years.
|
Quote:
|
Yeah, been working with UNIX since 82.
|
All times are GMT -5. The time now is 03:35 AM. |