Cron can be set up to log. If you look at the manpage for cron, there should be some directions there.
I looked in my /var/log/cron.log and I see timestamps and the command that was run. If you are looking for something script specific, you may want to edit the script to make its own log file.
I know for any cron commands I add myself, that if I don't add > /dev/null after the command then it sends an E-Mail to root each time it executes with the results. I have root redirected to myself so I get those mails. Usually I leave it mail me until I'm comfortable everything is working right and then I suppress it, as I have better things to do than read cron E-mail. You might want to su yourself and check the root mail. Maybe the messages are laying in that mailbox. Or just cat /var/mail/root or wherever your system hides its mail.
I believe it only sends the mail if there is output back to the shell. Like an echo command or returned output from an ftp, or the like. If you run the script interactively and there's no output to the screen, I don't think any messages will be logged or e-mailed.
Of course, you could always add a line #echo "Completed" to your script at the end if it completes.
I usually set up sendmail and have all of root's mail forwarded to my "real" e-mail address.
I also found that if I don't end a PHP script with ?>, it will send the mail. Eliminating the end tag seemed to stop the mails. Donno why?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.