I’ve created a handful of python scripts to essentially take an argument “–db” where you input the database name, it does a pg_dump of our Resolve Project Databases and stores them on our NAS. (resolveDbHourly.py, resolveDbDaily.py, resolveDbWeekly.py, resolveDbMonthly.py)
I can manually submit these by restricting the pool and group to the Resolve DB backup server and manually submitting a miscellaneous/python job in the monitor.
I’d like to essentially schedule these miscellaneous python submissions to happen hourly, daily, weekly and monthly through deadline to give us a central place for monitoring and we can be notified when a script fails to run.
So for the Hourly scheduling you might need to do something else.
A possible workaround would be to create an Event plugin that requeues a job every N minutes. Similar to the Spot Event Plugin, but much simpler. It could be registered to the House Cleaning event which normally executes every 60 seconds. In that Event script, you could
Query the Deadline queue to find the job with the script that should run
Check the Job’s last completed date and time
Get the current date and time
Subtract the two time values
If the Job completed 1 hour ago, requeue the Job so it would run again.
Once it is completed, it will sit there for another hour before the Event requeues it again…