What is the next run date of a new SQL Server Job?

7.2k views Asked by At

I created a new SQL Server job which will run once a year, it's currently enabled and configured to run on 1st day of new year.

In order to make sure configuration date is correct, I run this command:

sp_help_jobschedule @job_name = 'MyJobName'

It returns "next_run_date" and "next_run_time" as 0.

How can I see next_run_date and next_run_time of a new SQL Server job which never executed before?

2

There are 2 answers

1
TheGameiswar On

You need to look at msdb.dbo.sysschedules .The column freq_type would give the frequency of job..

1 = One time only

4 = Daily

8 = Weekly

16 = Monthly

32 = Monthly, relative to freq_interval

64 = Runs when the SQL Server Agent service starts

128 = Runs when the computer is idle

1
liotims On

You can also view the next run datetime from Management Studio. In your SQL Server agent you can find Job Activity Monitor (doublic click on it).

enter image description here

Then you will see the next run column