Originally Posted by AnAsianCalledRusty
I have a script scheduled to run with Crontab at 5am each weekday.
The script is all good and executes manually (is just a simple stop/start of a service) I have reason to believe that it is not executing according to schedule. I am looking to see when a script was last executed.
**EDIT** The script is executing accordingly (long story short, I forgot it was Tuesday). I would still like to know how to check a last-execution time.
You don't say what version/distro of Linux you're using, but yes. Check in /var/spool/cron, and you may see a /logs or a /lastrun directory. Check the files to see what ran. The cron logs may be in a different place depending on your distro, but should be somewhere under /var. A "find /var -name *cron*" should give you a starting point.
Another low-tech idea would be to put a simple "echo $DATE >> my-crontab-script-logfile-name", and have it burp out a date (and whatever else you'd like) to a specific file after it runs each time.