• Hugo Kornelis (8/20/2015)


    Good question. I don't think many people are aware of this alternative method to change schedules. (And it can be handy to know it exists in edge cases where you need to programmatically change the schedule of a job).

    When replying to the question, I did not look at the "(from XX)" notes after each answer, as sp_update_jobschedule only takes new values and does not request specifying the old values as well. But in all honesty, I don't think they are correct. "From 4" on subday_type suggests that the job was formerly run every so many minutes; I think that the setting was 1 ("at the specified time"). And the freq_subday_interval could have been anything because subday_type 1 ignores it; it probably was NULL (its default value).

    +1

    Those "from" values are a silly distraction. Putting 0 in freq_subday_interval is a very silly thing to do (if it's actiually possible to do it - I've never tried so I don't know, but I believe it ought not to be possible).

    Tom