Issue running the scheduled task [Solved]

Nov 14, 2013 at 9:35 PM
It seems that the Task Scheduler on my Windows Server 2012 have a problem running this script if it is placed on a location that contains a Space char. such as

C:\Program Files\Codeplex\SPBestWarmUp

I just placed the script in C:\Inetpub\Codeplex\SPBestWarmUp and it Works great!!

FYI the Task Scheduler error codes I used to figure out the problem was found in a forum:

0 or 0x0: The operation completed successfully.
1 or 0x1: Incorrect function called or unknown function called.
2 or 0x2: File not found.
10 or 0xa: The environment is incorrect.
0x41300: Task is ready to run at its next scheduled time.
0x41301: Task is currently running.
0x41302: Task is disabled.
0x41303: Task has not yet run.
0x41304: There are no more runs scheduled for this task.
0x41306: Task is terminated.
0x8004130F: Credentials became corrupted (*)
0x8004131F: An instance of this task is already running.
0x800704DD: The service is not available (is 'Run only when an user is logged on' checked?)
0xC000013A: The application terminated as a result of a CTRL+C.
0xC06D007E: Unknown software exception.

Thanks for a great script!
Jesper
Marked as answer by JesperMChristense on 11/14/2013 at 2:35 PM
Jan 5, 2015 at 6:26 PM
Good find, we were experiencing the same issue and you saved us a bit of time.

Thanks.
Jan 13, 2015 at 8:03 PM
Theoretically, this shouldn't be an issue if you use the system variable %programfiles% or %programfiles(x86)% in task scheduler configuration

E.g %programfiles%\Codeplex\SPBestWarmUp