Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

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 ajoutée par Gautam Sahib PMP , Senior Administrator - IT Applications, ERP , FAWAZ TRADING & ENGINEERING SERVICES CO.W.L.L
Date de publication: 2017/01/25
Ahmed Sabra
par 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
par 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

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?