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?
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