In the shared environment, the server's resources are shared by all users hosted on that server. For this reason, blocking part of the server's memory by certain scripts or applications for more than 300 seconds is not possible.

As a general programming principle, a web application that needs to run more than 0.5-1 seconds must be optimized in the shortest time.

In the case of cron jobs, they can process more information and therefore the above principle is not applicable. If the interval of 300 seconds is not enough for the completion of the information processing by a cron-job, you can opt for 2 options:

  1. modification of the script that runs as cron-job so as to process limited amounts of information and not to exceed 300 seconds at each execution. Through multiple/repeated executions (eg once per hour) all the necessary information will be processed (each time a different part of the information will be processed)
  2. if changing the script that runs as cron-jobs is not possible and your script does not fall within the 300-second limit, we recommend that you opt for a VPS (in which case you can configure PHP according to the needs of your application).
Was this answer helpful? 0 Users Found This Useful (0 Votes)