Q:

How Can I physically see running Cronjobs?

I have cronjobs that execute PHP files at pre-determined times. These scrips can take over an hour to complete. I want to be able to physically monitor the scripts. I have logs, of course, and lots of ways to handle errors, but sometimes I just like to see what's happening.
Previously I did this on Windows where I would schedule a task which would launch in a shell that would remain open while the task ran.
Can I do this on Linux? Using SSH? Something perhaps like using screen with the cron? I'm using the AWS version of Linux.
Thank you.

A:

You can pipe output of a cronjob to a logfile, and you can use unix tools (tail, watch, etc) to view all the output as it goes, e.g. the following redirects STDERR as well as STDOUT to a log file:-
/usr/bin/really_long_script.sh > /tmp/script.log 2>&1

tail -f /tmp/script.log

