Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What should be ideal output of a PHP script which is called by Cron on hourly basis?

What should be ideal output of a PHP script which is called by Cron on hourly basis?

user-image
Question added by Gautam Sahib PMP , Senior Administrator - IT Applications, ERP , FAWAZ TRADING & ENGINEERING SERVICES CO.W.L.L
Date Posted: 2017/01/25
Ahmed Sabra
by Ahmed Sabra , Integration Support Engineer- Fintech , Saudi Financial Technology Company

You can log its output to a file for later debug and monitor.

You can do that from crontab:

 

* * * php /path/to/task1.php        >> /path/to/task1.log

 

Atif Majid
by Atif Majid , Senior PHP Programer/Team Lead , RedApple Apartments AB

As the cron runs without any user interaction, it doesn't really matter what output script gives. But, if you want to monitory progress of your cron scripts, add the relevant data for each cron job to a log file so you can evaluate how successful your cronjob is.

More Questions Like This