-2

Will it not put a lot of load on the server and reduce the overall performance of the app if there is a cron running on the server say every minute. And not just the one, but multiple such crons. Using Laravel Scheduler right now to do something similar.

If I stop the Scheduler and instead use a external scheduling service like https://www.easycron.com which will run the crons and hit the urls with http methods that have been set to them.

The calls routed to a controller function which will execute what otherwise the internal cron service would have.

Which method is more recommended/advised and why?

TylerH
  • 20,799
  • 66
  • 75
  • 101
simba777
  • 71
  • 14
  • The load on your server depends a lot on what your crons are *doing*. In either scenario - HTTP-triggered or cron-triggered - the load is still the same. – ceejayoz Oct 21 '19 at 21:18

1 Answers1

4

A few things here:

  • The load on the server by running the Laravel scheduler every minute is quite low because the scheduler will only run the actual commands at the configured intervals. If no commands have to be run it will take a minimal amount of CPU/memory
  • Using Laravel scheduler you can keep your cron configurations inside version control
  • Services like easycron require you to have external access to commands which you might want to keep internal

Based on the above I'd say Laravel scheduler is your best choice.

Salim Djerbouh
  • 10,719
  • 6
  • 29
  • 61
PtrTon
  • 3,705
  • 2
  • 14
  • 24