Home > cPanel > How to log CRON job activity to file, not email?

How to log CRON job activity to file, not email?

It is possible to log cron job activity into files, instead of the e-mail.

Please add this line as your cron job: php /home/username/public_html/cronjob.php >> /home/username/cronlog.log 2>&1

WHERE: /home/username/public_html/cronjob.php - is the path to your script which you want to be executed.

 /home/username/cronlog.log - is the path to the log file where you wish to log cron job activity.