Hi,
I want to execute the specific job"OnDemand_Goals" at 8am EST on the day 4 of every quarter like mentioned in the below condition.I am executing the SP below from another job"Scheduled_Goals".Can you let me know:
- how many times on Day4 at 8th HR (jobs run in the server in EST already) would the job run as i am not specifying mm,ss conditons? I am unsure if the job would run more than once with my query.I want it to run only once.
- Do still need to add a schedule in the job"Scheduled_Goals" ?
- I tried this in my test machine and job didnt kick off at all.Can you pls correct
alter proc Load_QTRMilestones as
begin
if
(
datepart(day,convert(date,DATEADD(QUARTER, DATEDIFF(QUARTER, 0,getdate()), 3)))=4 and
(datepart(hour,convert(date,DATEADD(QUARTER, DATEDIFF(QUARTER, 0,getdate()), 3)))=8 and
DATEPART(MONTH, getdate()) IN (1,4,7,10))
)
begin
exec msdb.dbo.sp_start_job N'OnDemand_Goals'
END
end
Pls provide another solution you know would work better.