I have a MySQL table on a Ubuntu or CentOS machine which contains rows on when to start and stop a bunch of 1000 AWS / Azure servers.

Right now its implemented in such a way that a cron is running every minute to check the rows data and start / stop the respective servers.

I want to know if there's a more efficient method to achieve this ?

  • How many points in time to do some actions you have? How often there are changes in scheduled jobs? May 26, 2023 at 7:05
  • Is there a specific problem that you experience with your current set-up? Because unless there is, I wouldn't worry about premature optimisation. Note: that almost always a more efficient solution exists but it may not be necessary to implement it or to cumbersome to do so... - A native scheduler like docs.aws.amazon.com/solutions/latest/instance-scheduler-on-aws/… may be a suitable different approach, but when you have a hybrid cloud you'd also need to maintain the native solution for Azure to get the same effect you probably increase complexity.
    – HBruijn
    May 26, 2023 at 7:06
  • So the script to start / stop cloud servers was done with long ago - I was just thinking if there's a way not to run a cron every minute - something like using event triggers at the OS level ?
    – anjanesh
    May 26, 2023 at 7:32
  • @anjanesh, how often you exec the operation of start/stop, some example table will be helpful. May 26, 2023 at 8:31
  • Well - there are are about 50,000 servers and some 100-500 of them for denoting start stop operations in a separate table. I don't think there are more than 100 start/stops in a minute though.
    – anjanesh
    May 26, 2023 at 13:08


You must log in to answer this question.

Browse other questions tagged .