Option to remove onetime schedule when completed
I have a runbook that schedules itself to run again one hour after it completes. It does this by creating a onetime schedule. The reason for doing this rather than using a regular (i.e. not a onetime) schedule is to prevent the runbook from starting while the previous job is still running (I discussed this approach with Joe Levy here: http://social.msdn.microsoft.com/Forums/en-US/06f1b011-1fe2-4a3a-a0a3-88256f83a3ea/can-i-prevent-multiple-instances-of-the-same-runbook-from-running-concurrently?forum=azureautomation)
Unfortunately this means that my Assets screen becomes littered with expired onetime schedules (22 or 23 every day) and there's no simple way to go and clean them all up.
Hence this request is for an option on New-AzureAutomationSchedule to remove a onetime schedule once it has expired.
That’s an interesting idea – thanks for the feedback. We can look into it.
In the meantime, you could probably work around this. I’m not exactly sure what your runbook looks like, but it might make sense to create the schedule with the same name each time, then when the runbook starts again to delete that schedule, then to create it again at the end.
Jamie Thomson commented
Thanks Beth, that's not a bad idea.