System Variables for SQL Server JOBs | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

System Variables for SQL Server JOBs

Hi,
I am new to SQL server Development. on my work, I am given one task to complete. There are several daily jobs running in our SQL server. There is one Job(Job-A) that I need to look after. as and when that Job-A completes, I need to see if that day is the Last Day of the Month or not? If that is the last day of the month then invoke another Job. Now here is the tricky part. I don’t have to only validate if that day is the Last day of the month. But also I need to make sure that even if that is not the last day of the month, that should be the last day of the Job-A Schedule for the Month. Let me clarify with the example.
Job-A is running for Monday through Thursday in a month.
Now, Lets say, Friday is the Last Working day of this Month. So, if Job-A completes on Thursday for this month, that should be the last day of the month, cause that job is not going to run again in this month. so right away it should invoke Job-B on Thursday. That’s what i want to do. Please Help… Thanks in advance.

Kindly don’t duplicate posts. http://www.sql-server-performance.com/forum/topic.asp?TOPIC_ID=20394
Luis Martin
Moderator
SQL-Server-Performance.com All in Love is Fair
Stevie Wonder
All postings are provided “AS IS” with no warranties for accuracy.
]]>