SHIFT

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


win2008tasks
Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
win2008tasks [2013/05/01 15:29]
sjoerd [Creating a Task]
win2008tasks [2019/06/04 11:38] (current)
sjoerd [Troubleshooting]
Line 1: Line 1:
-= Schedule Tasks on Windows Server ​2008 =+= Schedule Tasks on Windows Server =
  
 The location of the Windows Server 2008 Task Scheduler is a little bit changed. You can find it by starting Server manager -> Configuration -> Task Scheduler. If you created custom tasks you can find them under Task Scheduler -> Task Scheduler Library. ​ The location of the Windows Server 2008 Task Scheduler is a little bit changed. You can find it by starting Server manager -> Configuration -> Task Scheduler. If you created custom tasks you can find them under Task Scheduler -> Task Scheduler Library. ​
Line 13: Line 13:
 ** Go to the permissions tab of the vCenter and add the user while assigning read-only rights and propagating this to all child objects. ​ ** Go to the permissions tab of the vCenter and add the user while assigning read-only rights and propagating this to all child objects. ​
  
-Than the task:+Then the task:
 * Click on Create Task * Click on Create Task
 * In the General tab: * In the General tab:
Line 32: Line 32:
  
 When you click OK the task will ask you for the password of the service account you provided in the General tab.  When you click OK the task will ask you for the password of the service account you provided in the General tab. 
 +
 +> Arguments on Windows Server 2016 with a script on a remote repository: {{{-Executionpolicy Bypass -nologo -noninteractive -command "& {\\fileserver\dfs\SCRIPT_REPOSITORY$\ICTScripts\script.ps1}"​}}}
  
 = Test the Task = = Test the Task =
Line 38: Line 40:
 = Troubleshooting = = Troubleshooting =
  
-0x1 - Do not create a batch file for the script but set it up as explained above. \\ +0x1 - Do not create a batch file for the script but set it up as explained above. \\ 
-0x41301 - Actually, the batch file is running. Please wait for the script to finish. \\  +0x41301 - Actually, the batch file is running. Please wait for the script to finish. \\  
-0x80070569 - The user does not have "logon as a batchjob"​ permissions. Assign the rights as explained above. \\ +0x80070569 - The user does not have "logon as a batchjob"​ permissions. Assign the rights as explained above. \\ 
-It's also possible to create logging from the scheduled task, to do so, add the following part to the parameter part of the command: {{{ > c:​\temp\logfile.txt}}}+It's also possible to create logging from the scheduled task, to do so, add the following part to the parameter part of the command: {{{ > c:​\temp\logfile.txt}}} 
 +* the operator or administrator has refused the request 0x800710e0 - Event 153: Task Scheduler did not launch task "\ICT Control Framework 16 - Management Domain"​ as it missed its  schedule. Consider using the configuration option to start the task when available, if schedule is missed 
 +** Not yet fully fixed, I recreated the tasks and set the new tasks to "Run task as soon as possible after a scheduled start is missed"​  
 +== Delete Tasks == 
 + 
 +When troubleshooting you might want to completely remove scheduled tasks. If you want to make sure that a task is completely removed you can check both the filesystem and the registry: \\ 
 + 
 +Filesystem:​ 
 +<​code>​ 
 +%systemroot%\System32\Tasks 
 +%systemroot%\Tasks 
 +</​code>​ 
 + 
 +Registry: 
 +<​code>​ 
 +HKLM\Software\Microsoft\Windows NT\CurrentVersion\Schedule\Taskcache\Tasks 
 +HKLM\Software\Microsoft\Windows NT\CurrentVersion\Schedule\Taskcache\Tree 
 +</​code>​ 
  
 +> Note that if you recreate the task with the same name, the old history is still displayed. As the ID of the task changes on recreation it probably checks the eventlog based on the name. 
  
 {{tag>​windows vmware scripts}} {{tag>​windows vmware scripts}}
win2008tasks.1367414992.txt.gz · Last modified: 2013/05/01 15:29 by sjoerd