How to Import/Export a scheduled task

It is very important when you want to move your server from one web host to another one and you wish to move your scheduled task hosted from Windows Server.

In this case, I will take Windows Server 2008 as an example:

Export Scheduled Task,
1. Open Task Scheduler or run taskschd.exe.
2. Select the Task that you wish to export and hit on the Export link from the right bar.
3. Save the xml file.

Import Scheduled Task,
1. Open Task Scheduler or run taskschd.exe.
2. Click the Import link from the right bar and you will now see the Task created.

Windows:Run Task Scheduler with System user

Task scheduler or scheduled task is very important for a system administrator to manage the self design script to monitor from a server.

However, you might found out when you schedule a task from Windows Server 2003 with your used user such as batch file with .bat, you will get a command prompt popped up every time you are performing other task where this is annoyed.

To overcome this problem, I just found out that we can use System user to set the task without worry the above problem and it could solve when you have implement forced password change from a server.

I have come out the solution for Windows Server 2003 and Windows Server 2008.

Windows Server 2003,
With Windows Server 2003, you may look for the scheduled task from Control Panel, and look for Scheduled Task.

If you are creating the new task, just enter the information needed and use the user of “System”(Exactly, case sensitive) as the user.
Note: System or NT AUTHORITY\SYSTEM, where I will use System only where it is easy to remember.

If you are modifying old task, change the user to System and use empty password.

Windows Server 2008,
With Windows Server 2008, go to the Administrative tool and look for Task Scheduler.

When you create the task or modify it, just click the button of “Change User or Group…” and change it to SYSTEM. That all.

Windows Schedule Task 0x80070005: Access is denied

When you setting up a scheduled task from your Windows Server 2003, sometimes you might find out the error as below.

Error 0x80070005: Access is denied.

You might wonder what wrong with your scheduled task and how to fix it, basically this error caused by the Windows permission of the batch file you run from scheduled task.

To get this fix, actually you have 2 options.

Option 1:
1. Open Windows Explorer, from the Address bar, type in “%windir%\System32”.
2. Look for cmd.exe, right-click and go to properties.
3. Click on Security tab and add the user you are using to set the scheduled task, then grant read and write permission to these user.

Option 2:
1. Open Windows Explorer, from the Address bar, type in “%windir%\System32”.
2. Look for cmd.exe, right-click and go to properties.
3. Click on Security tab and add user name “BATCH”, then grant read and write permission to this user.