﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Discuss Content Posted by Peter He / Article Discussions / Article Discussions by Author  / SQL Server Job Scheduling / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 21 May 2013 19:19:43 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: SQL Server Job Scheduling</title><link>http://www.sqlservercentral.com/Forums/Topic257689-262-1.aspx</link><description>i have set up a job to run every five minutes.If somehow the job takes more than five minutes in execution, will the sql scheduler run another instance of same job on five minutes cycle? when the last execution has not been completed?</description><pubDate>Thu, 27 Sep 2012 07:18:05 GMT</pubDate><dc:creator>kas07</dc:creator></item><item><title>RE: SQL Server Job Scheduling</title><link>http://www.sqlservercentral.com/Forums/Topic257689-262-1.aspx</link><description>hi , i c your msg, and i have the same question. Can I perform this schedule jobs dynamically, with some conditional parameters ... ?? .. if you know something about it, please contact me ...</description><pubDate>Wed, 01 Feb 2012 10:48:46 GMT</pubDate><dc:creator>ruben 99661</dc:creator></item><item><title>RE: SQL Server Job Scheduling</title><link>http://www.sqlservercentral.com/Forums/Topic257689-262-1.aspx</link><description>Thanks for such good article</description><pubDate>Fri, 26 Nov 2010 06:50:35 GMT</pubDate><dc:creator>vilas979</dc:creator></item><item><title>RE: SQL Server Job Scheduling</title><link>http://www.sqlservercentral.com/Forums/Topic257689-262-1.aspx</link><description>Excellent article on Jobs.</description><pubDate>Thu, 14 Feb 2008 02:05:53 GMT</pubDate><dc:creator>Hem-586205</dc:creator></item><item><title>RE: SQL Server Job Scheduling</title><link>http://www.sqlservercentral.com/Forums/Topic257689-262-1.aspx</link><description>Were you able to complete the conditional scheduling for a SQL report?</description><pubDate>Mon, 10 Dec 2007 10:49:11 GMT</pubDate><dc:creator>Fox.David</dc:creator></item><item><title>RE: SQL Server Job Scheduling</title><link>http://www.sqlservercentral.com/Forums/Topic257689-262-1.aspx</link><description>[quote][b]Rasool Omidakhsh (11/16/2007)[/b][hr]...I have to run this dm_job everyday. ... [dw_job] I have to run this job on every second thursday. ...[/quote]I don't see a problem with this, I would do it along these lines.  dw_job has one schedule, occurs monthly, 2nd Thursday, runs once at 00:45.  dm_job has five schedules, first one is weekly on Friday through Wednesday, the other schedules run 1st, 3rd, 4th, and last Thursday.Unless I misunderstood your saying second Thursday and you meant every other Thursday, in which case do dw as Weekly, Every 2 Weeks, Starting 11/01/2007, then have dm_job doing the Thursday run Every 2 Weeks starting 11/08/2007.  dm would still need the Friday-Wednesday schedule.I think that would do it, but I could be wrong. :hehe:</description><pubDate>Fri, 16 Nov 2007 15:53:07 GMT</pubDate><dc:creator>Wayne West</dc:creator></item><item><title>RE: SQL Server Job Scheduling</title><link>http://www.sqlservercentral.com/Forums/Topic257689-262-1.aspx</link><description>An easy way to do it is to have a first step that determines if today is the day the dw_job should run or the dm_job.  You can cause the step to fail based on your criteria of choice (you can use a SQL step or ActiveX to do this).  Then it's simply On Failure... load one, or On Succes.... load the other, in steps 2 and 3.  Remember to quit on success and failure in 2, tho..  ;)</description><pubDate>Fri, 16 Nov 2007 14:42:05 GMT</pubDate><dc:creator>Larry Aue</dc:creator></item><item><title>RE: SQL Server Job Scheduling</title><link>http://www.sqlservercentral.com/Forums/Topic257689-262-1.aspx</link><description>One thing Peter failed to mention is that if you want to see lots of job history, be sure the job history log is big enough (Job System within SQL Server Agent properties).</description><pubDate>Fri, 16 Nov 2007 14:13:12 GMT</pubDate><dc:creator>Calvin E. Wrightsman</dc:creator></item><item><title>RE: SQL Server Job Scheduling</title><link>http://www.sqlservercentral.com/Forums/Topic257689-262-1.aspx</link><description>Using DTS in 2000 I run a check for every second Thursday with the following code and set the 'job' to run every Thursday.  If it is the right day the DTS continues otherwise it simply fails. '*******************************************************'  Visual Basic ActiveX Script'*******************************************************' Test for the second week since a Job can only be set' to work within a week.  Prime with a run date.Function Main()Dim myDateDim oddEvenmyDate = datediff("ww","8/10/2007",date())oddEven =  (myDate Mod 2)    if oddEven = 0 then	Main = DTSTaskExecResult_Success   else	Main = DTSTaskExecResult_failure  end ifEnd Function</description><pubDate>Fri, 16 Nov 2007 13:30:35 GMT</pubDate><dc:creator>Jim McCoy-259251</dc:creator></item><item><title>RE: SQL Server Job Scheduling</title><link>http://www.sqlservercentral.com/Forums/Topic257689-262-1.aspx</link><description>Thanks Philippe. However the question was if we can handel condition for schedule. For example lets say I have a Job that runs 4 SSIS packages that loads my data mart (I call it dm_Job). I have to run this dm_job everyday. I have another job that runs 20 SSIS packages that loads the whole data warehose (I call it dw_job). I have to run this job on every second thursday. I have to start both these jobs at 00:45 AM. Here is what the issue; if today is the thursday that I am loading the data warehouse I should not run the data mart job because it is part of the dw job. So I need to know if I can have conditions(exceptions) in the schedule.</description><pubDate>Fri, 16 Nov 2007 13:11:24 GMT</pubDate><dc:creator>Rasool Omidakhsh</dc:creator></item><item><title>RE: SQL Server Job Scheduling</title><link>http://www.sqlservercentral.com/Forums/Topic257689-262-1.aspx</link><description>[quote][b]Rasool Omidakhsh (11/16/2007)[/b][hr]Ok we can add multiple schedule to a job. But can we do conditional schedule? Can we for example have a schedule for everyday except the last Thursday of the month? In general how do you handle conditions we may have in SQL Agent?[/quote]Not sure if there is anyway to do this in SQL Agent however what you can do is to use a job step that runs a ssis package where you have a script that will either fail or succeed the package based on any condition you want. Then you handle the job step success or failure to either exit the job reporting success or branch to some or next step.Philippe</description><pubDate>Fri, 16 Nov 2007 12:14:04 GMT</pubDate><dc:creator>Philippe Cand</dc:creator></item><item><title>RE: SQL Server Job Scheduling</title><link>http://www.sqlservercentral.com/Forums/Topic257689-262-1.aspx</link><description>Yep, that's my kludge code all right</description><pubDate>Fri, 16 Nov 2007 09:43:54 GMT</pubDate><dc:creator>Jim McCoy-259251</dc:creator></item><item><title>RE: SQL Server Job Scheduling</title><link>http://www.sqlservercentral.com/Forums/Topic257689-262-1.aspx</link><description>Ok we can add multiple schedule to a job. But can we do conditional schedule? Can we for example have a schedule for everyday except the last Thursday of the month? In general how do you handel conditions we may have in SQL Agent?</description><pubDate>Fri, 16 Nov 2007 09:24:14 GMT</pubDate><dc:creator>Rasool Omidakhsh</dc:creator></item><item><title>RE: SQL Server Job Scheduling</title><link>http://www.sqlservercentral.com/Forums/Topic257689-262-1.aspx</link><description>Start it to run when you expect it and have it run every minute until it finds the file.  Sure, it runs often, but ends up doing very little.  When it finds the file, you can reschedule the job for the next scheduled time to look for the file as the last step.</description><pubDate>Fri, 16 Nov 2007 09:10:29 GMT</pubDate><dc:creator>Larry Aue</dc:creator></item><item><title>RE: SQL Server Job Scheduling</title><link>http://www.sqlservercentral.com/Forums/Topic257689-262-1.aspx</link><description>Very interesting.  I have had my share of scheduling challenges like running a job every second Thursday and still haven't come up with a good non-kludgy way of running a job based on receipt of a file to process which would arrive at a pre-determined time ( which may or may not arrive at exactly that time) but the output of the process is also very time dependant.</description><pubDate>Fri, 16 Nov 2007 06:32:28 GMT</pubDate><dc:creator>Jim McCoy-259251</dc:creator></item><item><title>RE: SQL Server Job Scheduling</title><link>http://www.sqlservercentral.com/Forums/Topic257689-262-1.aspx</link><description>When I clicked on the [b]this script [/b]hyperlink (for running a job more often than every minute), I got the following message:[i]Articles with tags Administering, sqlserverjobscheduling, 2288, Job_30sec.sql Search for any content tagged Administering &amp; sqlserverjobscheduling &amp; 2288 &amp; Job_30sec.sql   Sorry, nothing found for this search [/i]Not that putting it in one of those multi-line text boxes would have helped; they don't have vertical scroll bars in my browser.Mattie</description><pubDate>Fri, 16 Nov 2007 06:07:55 GMT</pubDate><dc:creator>MattieNH</dc:creator></item><item><title>RE: SQL Server Job Scheduling</title><link>http://www.sqlservercentral.com/Forums/Topic257689-262-1.aspx</link><description>&lt;P&gt;You can add multiple schedules for a job in Enterprise Manager.  Open the the job properties, click on the Schedules tab, and click on the New Schedule button.  As you define each schedule, save it by clicking OK.  Be sure that all the schedules are enabled.&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;</description><pubDate>Wed, 08 Mar 2006 08:54:00 GMT</pubDate><dc:creator>Greg Charles</dc:creator></item><item><title>RE: SQL Server Job Scheduling</title><link>http://www.sqlservercentral.com/Forums/Topic257689-262-1.aspx</link><description>&lt;P&gt;Very interesting article.  Is the only way to create multiple schedules for the same job through code, or can you do it through the Enterprise Manager interface?&lt;/P&gt;&lt;P&gt;Mattie&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description><pubDate>Wed, 08 Mar 2006 08:26:00 GMT</pubDate><dc:creator>MattieNH</dc:creator></item><item><title>SQL Server Job Scheduling</title><link>http://www.sqlservercentral.com/Forums/Topic257689-262-1.aspx</link><description>Comments posted to this topic are about the content posted at &lt;A HREF="http://www.sqlservercentral.com/columnists/phe/sqlserverjobscheduling.asp"&gt;http://www.sqlservercentral.com/columnists/phe/sqlserverjobscheduling.asp&lt;/A&gt;</description><pubDate>Fri, 10 Feb 2006 14:34:00 GMT</pubDate><dc:creator>peterhe</dc:creator></item></channel></rss>