Actually, computers are the ideal tools when it comes to performing tasks regularly and at a certain point in time. Almost all operating systems offer help programs. In Windows systems, this is the so-called task scheduler, which is called a task scheduler in the German-language versions. Microsoft has issued a general overhaul with Windows Vista, but since then it has been largely unchanged and is available on all versions of Windows 10 and on the servers.
First use of the task scheduler
In this article, we will show what the task scheduler can do and how to use it - and we will not leave out the friends of the command line.
Schedule a task
Whoever wants to start the task planner for the first time will not find it so easy. The path to Windows Server and Windows 10 is basically
Other properties
After the start of this program, the typical three-part window of an MMC (Microsoft Management Console) appears as it is used for many tasks of the system administration. For this reason, you can start this tool with Taskschd.msc directly from the command line.
Remote access included
The console is divided into three areas: On the right hand side, users are listed under the top entry Task Scheduling with an entry named Task Scheduler Library. Clicking on it opens a tree structure that lists all tasks entered on this local system. These are then again divided into categories such as .NET Framework or Active Directory Rights Management. By clicking on one of these categories, the program displays in the middle window which tasks are already defined, whether they are active or disabled, when they were last active, and when they are restarted. If the user has not selected any of these categories in the right pane, the middle window displays an overall view of the tasks on the system.
If you now want to define a new task on your Windows system, proceed as follows
Praxistipp: Many users want to use task scheduling to start not only system utilities but also self-running PowerShell scripts. There are two things to consider: After creating a new task, select Start program from the action menu. In the field Program / Script you can not enter the name of your script. Here you have to define the path to the program PowerShell.exe:% SystemRoot% \ system32 \ WindowsPower Shell \ v1.0 \ powershell.exe
Enter this path, which is valid for all Windows systems, including Windows 10 with the PowerShell 5, in one line. To enter the path to your script you want to start, enter the Add arguments (optional) window. This must be done in the form of a -command parameter: -command "C: \ my_scripts \ task.ps1" where you have to adapt this path to your system, of course. If the script is not running then you should check the execution policies that are running PowerShell scripts on your system, and then adjust them if necessary.
The properties window of each task, which you can also open by right-clicking on the task in the list in the middle window, offers the user a lot more setting options. For example, it can set whether the task is specifically configured for Windows 10 or Windows 7 or Server 2008. It can also specify which account to use to perform the task on the system.
Users can create and manage tasks directly from the MMC on other Windows systems on the net
Praxistipp: In numerous tests, we were able to find that this type of connection in a Windows domain worked well with different target systems, but there was often a problem with the remote system in a Windows workgroup. In these cases, make sure that the task scheduler (service name Schedule) service is active on the remote computer, as well as the services that depend on it (RPC and system event broker).
Not only the Linux supporters or pure nostalgics know how to work on the command line. For administrators, script execution is always useful and can help automate tasks. For task planning, Windows provides the command line program schtasks. A simple call to the form: schtasks lists tasks on the system in a relatively compact form. If you want to display all tasks in detail and with all parameters, choose the following call: schtasks / query / fo list / v | More
The / query parameter causes the command to list all scheduled tasks on this system. Use / fo to define the format of the display, we have selected the list format, as an alternative the table and CSV formats are still available. With / v, we finally determined that the output really shows all the settings and parameters. Since such an output is usually very extensive and then "rush" only over the screen, we have them with the pipe command | To the program more, which enforces a page-wise output. You can, of course, also redirect the output by means of the character> into a file, which looks something like this: schtasks / query / fo list / v> output. Txt
Also directly from the command line
The most important switches are
All of these calls have other parameters that allow the Admin to specify tasks more precisely. But also at the command line Windows offers here a help. For example, the call: schtasks / query /? The complete parameter list of this switch and lists examples for this.
Lesetipp
No comments:
Post a Comment