Planning issue

I have the following situation: I have several hundred resources at my disposal (PC / mobile / smart devices). I would like to make a network laboratory out of them, where users can request access to some or all of these devices, starting from a certain time. I am writing a planner for this purpose. At the indicated time, I want to inform the user that the request was submitted, and then run some tests on the devices automatically. I'm just wondering what would be an effective way to write a scheduler. At the moment, I thought of the following:

  • Whenever a query arrives, I put it in an SQL database table. I am writing a program to check this table for tasks that should run and run them. This will be periodic (say, every 5 minutes), so I cannot schedule immediate tests.

  • Save the task object for each task and attach a timer that fires at the specified time (it seems to be the least scalable).

  • Hybrid (1) and (2). I create job objects using timers, querying the database at a large interval (say, 30 minutes). In the request, I get all the tasks that should appear in the next 30 minutes or so.

Is there a better / cleaner way to do this?

Thanks for the answers in advance!

+3
source share
1

Quartz.net... java Quartz , .

+1

Source: https://habr.com/ru/post/1759086/


All Articles