|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: 2 days ago @ 8:33 AM
Points: 531,
Visits: 419
|
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Tuesday, June 11, 2013 6:18 AM
Points: 2,389,
Visits: 710
|
|
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? Mattie
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Yesterday @ 5:14 PM
Points: 4,009,
Visits: 4,891
|
|
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. Greg
Greg
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Tuesday, June 11, 2013 6:18 AM
Points: 2,389,
Visits: 710
|
|
When I clicked on the this script hyperlink (for running a job more often than every minute), I got the following message:
Articles with tags Administering, sqlserverjobscheduling, 2288, Job_30sec.sql Search for any content tagged Administering & sqlserverjobscheduling & 2288 & Job_30sec.sql Sorry, nothing found for this search
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
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, May 01, 2013 6:17 AM
Points: 21,
Visits: 236
|
|
| 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.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Yesterday @ 1:15 PM
Points: 142,
Visits: 540
|
|
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.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, June 26, 2012 2:39 PM
Points: 155,
Visits: 23
|
|
| 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?
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, May 01, 2013 6:17 AM
Points: 21,
Visits: 236
|
|
| Yep, that's my kludge code all right
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Friday, June 14, 2013 11:05 AM
Points: 48,
Visits: 268
|
|
Rasool Omidakhsh (11/16/2007) 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?
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
BI Guy
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, June 26, 2012 2:39 PM
Points: 155,
Visits: 23
|
|
| 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.
|
|
|
|