Windows 2008 scheduled task weekdays




















I created another task for the holidays. It runs a powershell script that disables the autodialer task. Once the holiday is over another task is run to re-enable the the task. 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. Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Asked 9 years, 3 months ago. Active 2 years, 4 months ago.

Viewed 18k times. Besides, it also enables you to clone your system , partition, or disk to keep your data safe. Why would you backup Windows Server weekly? Method 1.

Click Create Task to begin the settings. In Triggers, click New to specify which day s you want the backup to run. For example to backup the C: drive including all critical volumes to the G: drive, you can write the following command: start backup -backupTarget:G: -include:C: -allcritical. Do you need any more help? Have you solved your problem? Otherwise, enter the query in the search box below. Give the task a name. Configure it to run whether the user is logged on or not.

Then click OK. Choose New under the Triggers tab. Select On a schedule from the pull-down menu. Choose Weekly and specify the day in a week to run the backup. Choose New under Actions tab. Put the following wbadmin command in the pane next to Add arguments optional.

To backup more than one volume, separate them with a comma. Click OK. You will be prompted for the password for the user account. Do you need any more help? Have you solved your problem? The following describes the various trigger types and the settings that can be configured for each type:.

On a Schedule— Triggers for a schedule allow tasks to run on a specific date one time , Daily, Weekly, or Monthly. For reoccurring tasks, the start time can be configured along with reoccurring options to completely customize when the task will run. At Startup— There are no specific settings for tasks configured to run at startup.

This type of trigger runs whenever the system starts and the only settings are the advanced ones, which are described later in the chapter. On Idle— The settings for tasks set to run when the computer is idle are set on the Conditions tab. On an Event— This trigger causes a task to run when specific events are created in an event log. You can choose either a basic event trigger or custom event settings.

Basic settings fire based on a single event from a specific event log. You choose which log contains the event, the publisher name, and the event ID. If you specify the custom event trigger settings, you can specify an XML event query or custom event filter to query for events that will fire the task. On Connection to User Session— The trigger fires when a user connects to the system using the Remote Desktop Connection program from another system and can be set to run when any user connects, or when a specific user or group connects to the server.

The trigger can be set to run for all users or a specific user or group. On Workstation Lock— The trigger fires when the workstation is locked. The settings for this trigger enable you to set it for all users or a specific user or group. On Workstation Unlock— This trigger fires when the workstation is unlocked. Advanced settings exist when creating triggers. Familiarize yourself with these advanced settings to ensure trigger creation and the workflow process is fully optimized.

The following bullets explain each of the advanced settings associated with triggers:. Delay Task for or Delay Task for Up To Random Delay — Tasks can be delayed randomly so that they do not start immediately when the schedule triggers a task.

For systems that might run the same tasks, this ensures there is some load balancing and that all systems do not run tasks at exactly the same time. Random delays can be set for 30 seconds, 1 minute, 30 minutes, 1 hour, 8 hours, or up to 1 day. Repeat Task Every— Tasks can also be set to repeat at regular intervals and for a set duration for example, a task could be set to ping a particular system every minute for 1 day, write an event to the event log in the case of a failure, and email a distribution group to notify the IT team about the issue.

Stop Any Task If It Runs Longer Than— Tasks can be stopped if they run past a defined amount of time and can be set to expire at a certain date and time. Start and Expire— Start and Expiration times can be set to synchronize across time zones to ensure tasks set to run on systems in multiple time zones start and stop at the same time. Enabled— Tasks can be enabled or disabled by checking or unchecking the enabled box. As mentioned earlier, an action is the work conducted when a task runs.

Tasks can have a single action or up to a maximum of 32 actions. The Actions tab of a task contains a list of actions associated with a particular task. An administrator can edit each action as follows:.

Start a Program— This action starts a program or script. Alternatively, the administrator can browse the application or script. If further command-line arguments are required, these can be specified in the Add Arguments Optional text box. In the Start In Optional text box, the working directory can be specified for the command line that executes the program or script.

This path is either the path to the program or script or to the files that are used by the executable. Send an E-mail— This action sends an email when the task is triggered. In the Edit Action dialog box, you enter who the email is from, who it should be sent to, a subject, and any desired text. You must also enter a valid SMTP server.

Display a Message— This action simply displays a message on the console of the system where the task is created. You can enter a title for the message as well as any text that should be displayed.

Conditions in conjunction with triggers determine whether the task will run. Tasks will not run if any condition associated with a given task is not fulfilled. The following sections illustrate the types of conditions associated with a task:.

Idle Conditions— A trigger can be based on idle time of a computer. Idle time is checked by the Task Scheduler service every 15 minutes. Computers are idle if a screensaver is running. In this situation, mouse or keyboard input should also be nil during this period of time. The Task Scheduler service only waits for user input to mark the end of an idle state.



0コメント

  • 1000 / 1000