-1

When setting up a cron job what is the difference as far as performance and script execution time between GET, cURL or PHP as the command to execute a PHP script (is a public page on the webserver). The script can run for a long time (many minutes) and I don't want to get a script timeout.

Thanks.

danronmoon
  • 3,814
  • 5
  • 34
  • 56
Veign
  • 608
  • 4
  • 7

1 Answers1

2

The performance difference for a multi-minute process between calling over HTTP vs calling via command line should be negligible.

If you hit the web page via http (like with curl), then you have 2 timeouts to deal with:

  1. the http server timeout
  2. php timeout How to increase the execution timeout in php?

If you hit the php script via php command line only, then you only have one timeout to deal with.

Nicholas Rees
  • 723
  • 2
  • 9