all groups > sql server (alternate) > september 2006 >
You're in the

sql server (alternate)

group:

Recurring Scheduled Job


Recurring Scheduled Job Bryan
9/13/2006 3:08:41 AM
sql server (alternate):
Is it possible to display when a scheduled job is next due to run in
either a view or a table?
If so, how?


thanks

Bryan
Re: Recurring Scheduled Job treschaud33 NO[at]SPAM yahoo.com
9/13/2006 12:17:10 PM
This is for SQL 2000. Running msdb..sp_help_job will display the
information. I dug through the msdb..sp_help_jobschedule and put the
following query together:

select name
,cast(left(cast(next_run_date as varchar),4)+'-'+
substring(cast(next_run_date as
varchar),5,2)+'-'+right(cast(next_run_date as varchar),2) +' '+
left(cast(next_run_time as varchar),2)+':'+substring(cast(next_run_time
as varchar),3,2)+':'+right(cast(next_run_time as varchar),2) as
datetime) "Next_Run"
from msdb..sysjobschedules

Converting the next_run_date and next_run_time columns got kind of
messy, but it works.
Re: Recurring Scheduled Job treschaud33 NO[at]SPAM yahoo.com
9/13/2006 12:36:35 PM

[quoted text, click to view]

This is not as good I hope. If the job isn't going to run until
tomorrow the next_run_date and next_run_time columns are zero.
Re: Recurring Scheduled Job Bryan
9/14/2006 1:34:28 AM
I thought you had it there :) Its a doozy I guesss

thanks for trying anyway

Bryan


[quoted text, click to view]
AddThis Social Bookmark Button