autolab / Autolab

Course management service that enables auto-graded programming assignments.
http://www.autolabproject.com/
Apache License 2.0
752 stars 214 forks source link

scheduler job disable #955

Closed cg2v closed 1 year ago

cg2v commented 6 years ago

scheduler jobs should have an enable checkbox, so they can be disabled without being deleted or setting a bogus next time.

A "don't run after" time value may also be useful

victorhuangwq commented 4 years ago

May I understand which page / feature is this referring to?

cg2v commented 2 years ago

this is https://autolab-dev.andrew.cmu.edu/courses/compserv-mock/schedulers/new (or edit)

cg2v commented 2 years ago

The issue is that things like bomblab and attacklab are set up the 3rd week of the semester, and then run forever, until I manually remove them from the database the next semester when I find 6 copies of bomblabUpdater running,

cg2v commented 2 years ago

It would also be nice if scheduler jobs automatically disable themselves if they throw (repeated?) exceptions.

damianhxy commented 1 year ago

A disabled checkbox and "until" field sound good to me -- I'll work on adding them.

The auto disable feature doesn't seem worth implementing for now, since instructors could wrap their code in a try-catch block. There's also the issue of picking a good threshold, and the complexity of making it an opt-in feature. While it would be simple enough to disable a scheduler immediately inside the rescue blocks of run_scheduler, I feel that it might not always be desirable behavior, especially if the Exception occurs only rarely, and we do not want to disable the scheduler just for it.