You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a job is scheduled to run while Netbox is not running, it will run immediately after Netbox starts again. This can cause problems in some scenarios, but I suppose it would be desirable in others. So I'm not sure of the best way to handle this. Maybe we need a checkbox to choose this behavior when creating a scheduled job?
In this case, I want to power cycle a PDU outlet weekly, for a device that gets buggy after running a long time. I schedule it to happen in the middle of the night when nobody is around. Suppose Netbox crashes and it misses this interval. The next day I fix the problem and restart Netbox. Now the power outlet will cycle during business hours, which is disruptive.
An easy way to reproduce this behavior:
Schedule a script to run every 5 minutes
Stop the Netbox service at 14:31 (systemctl stop netbox netbox-rq)
Wait 11 minutes, then restart Netbox service at 14:42 (systemctl start netbox netbox-rq)
Observe that the job ran twice at 14:42, and then again at its correct interval of 14:45.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
If a job is scheduled to run while Netbox is not running, it will run immediately after Netbox starts again. This can cause problems in some scenarios, but I suppose it would be desirable in others. So I'm not sure of the best way to handle this. Maybe we need a checkbox to choose this behavior when creating a scheduled job?
In this case, I want to power cycle a PDU outlet weekly, for a device that gets buggy after running a long time. I schedule it to happen in the middle of the night when nobody is around. Suppose Netbox crashes and it misses this interval. The next day I fix the problem and restart Netbox. Now the power outlet will cycle during business hours, which is disruptive.
An easy way to reproduce this behavior:
systemctl stop netbox netbox-rq
)systemctl start netbox netbox-rq
)Beta Was this translation helpful? Give feedback.
All reactions