Modifying a scheduled job

Using sp_sjobmodify you can configure a scheduled job to run at repeating intervals, on days of the week, or on specific dates in a month. The following examples modify the “hello world” job.

The following code sets the job to run every day at 09:00:

sp_sjobmodify ‘sjname=hello’, ‘starttime=09:00,repeats=1day’
go�

The following code sets the job timeout property to 120 minutes:

sp_sjobmodify @name='jname=hello', 
@option='default_timeout=120'
go�

The following code sets the job to run at 09:00 on Mondays and Fridays:

sp_sjobmodify ‘sjname=hello’, ‘starttime=09:00,endtime=09:00,days=Monday:Friday’�
go�

The following code changes the target server for the scheduled job:

sp_sjobmodify 'sjname=hello', 'server=prodASE’
go