I have a python script which requests the awx schedules via the REST API, the script loops for each schedule, enables the schedule, retrieves the schedule detail including next_run then disables the schedule again. The next_run value is unavailable via the API when the schedule is disabled (hence the enable).
There is a chance that my script will enable a schedule which is due to run during that enabled period thus the scheduler may start the job (patch and reboot the server), is there a way to disable the scheduler whilst my script is retrieving the next_run datetime please? Or and alternative method to retrieve the next_run without enabling the schedule.
At a time, I remember that we had some performance problems updating the next_run field. For various reasons, users would end up with a lot of short-cycle schedules that are normally disabled. Updating the next_run would result in a lot of updates, independent of the actual workload of the system.
The preview endpoint is a good alternative for the use case you mention.