Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We would like to scheduled a task on Windows Server on all weekdays. At the same time, the task should be disabled on the holidays. Please advise.

share|improve this question
The tricky thing might be how task scheduler knows its a holiday. I can't think of any cron-like system that is aware of this. – Journeyman Geek Oct 12 '12 at 11:09
May be, can we have a annual maintenance activity to disable the activity for those holidays? – user47289 Oct 12 '12 at 11:31
Might want to add the version of windows to your question. Task scheduler on newer and older version of windows are VERY different. – Journeyman Geek Oct 12 '12 at 11:47
OS Version : Win 2003 Server Enterprise edition – user47289 Oct 19 '12 at 8:48
What is the need for this? On Business holidays and weekends, we do not want to run a process. – user47289 Oct 19 '12 at 8:49

Well, One way I see to do this is to the task to end on a holiday, then have a second task starting on the next working day, and ending that task the next holiday. Rinse and repeat per holiday.

enter image description here

The newer versions of task scheduler does seem to let you string events together, but I don't see any option not to run a task on a specific day.

share|improve this answer
This looks cool. Say we have 10 business holidays, then will have 10 scheduled tasks. Thanks a lot. – user47289 Oct 19 '12 at 8:51
Could please give more info on string events together on the new task scheduler. – user47289 Oct 19 '12 at 9:00
On windows 7 (I don't have server 2012) You can set multiple triggers for the same task - so 10 triggers rather than 10 separate tasks under create tasks. Create basic tasks is closer to the options windows XP does. – Journeyman Geek Oct 19 '12 at 9:47

If this is a Windows Server 2008 - you can try the below from the Task Scheduler -

Screenshot for the Task Scheduler Trigger window pane

You can then uncheck the days you dont want the task to run as I have highlighted in blue.

I believe this is what you are looking for...

share|improve this answer

Better answer to what has already been suggested. Set multiple triggers but do it by month so separate trigger for each month and you can choose which days to run. Triggers will be checked sequentially and if they meet the date requirement, that specific trigger will run. Holidays and weekends can be left unselected. At the beginning of each year you would need to reset the days for each trigger you want the task to run but you can call that yearly maintenance. Or hell, set the triggers out for three years or so.. Whatever works for you.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.