ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

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
تم إضافة السؤال من قبل Gautam Sahib PMP , Senior Administrator - IT Applications, ERP , FAWAZ TRADING & ENGINEERING SERVICES CO.W.L.L
تاريخ النشر: 2017/01/25
Ahmed Sabra
من قبل 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
من قبل 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.

المزيد من الأسئلة المماثلة