Urgent!! Update job next_run !

  • Jobs next_run_date set to wrong value because of server date problem !

    I need to recalculate next_run_date according to last_run and job's schedule !

    Plz help !

  • Problem solved 🙂

    SELECT j.name AS JobName

    ,sch.name AS ScheduleName

    ,'EXECUTE msdb..sp_update_jobschedule @job_name = ''' + j.name + ''', @name = ''' + sch.name + '''' AS ReloadJobSchedules

    FROM msdb.dbo.sysjobschedules s

    INNER JOIN

    msdb.dbo.sysschedules sch

    ON s.schedule_id = sch.schedule_id

    INNER JOIN

    msdb.dbo.sysjobs j

    ON s.job_id = j.job_id

    WHERE sch.[enabled] = 1

    ORDER BY

    j.name

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply