Skip to content

PHP max_execution_time

edited July 2017 in Questions

I have read that the sending cron should be set to 5mins, however I have not read anything about the max_execution_time in PHP.

By default, the max_execution_time is 30s in PHP installations. If we set the cron to every 5 mins, the server will timeout after 30s and not sending anything for another 4.5mins.

So, am I correct to say the max_execution_time in PHP settings should be set to 0, and the scheduled.php cron set to every 5mins?

Comments

  • BenBen
    edited July 2017

    Hi,

    When you setup a cron job to run the scheduled.php script, the script is run via command line by the cron job. As per PHP’s documentation, if a script is executed via command line, the max_execution_time defaults to 0 (unlimited):

    Screenshot:

    Thanks.

    Best regards,
    Ben

This discussion has been closed.