I am trying to run a Matlab script every day using the Windows Task Scheduler. I am using Matlab R2011b 64-bit, and Windows 7. According to Matlab, a script
myfile.m can be run from the command line as follows:
matlab -r myfile
On my old computer (32 bit XP), I could execute the script by putting the following in the 'Run' window of the XP Task Scheduler:
C:\PROGRA~1\MATLAB\R2010a\bin\matlab.exe -r myfile;quit
But when I enter the following on my new computer's Windows 7 Task Scheduler, the Task stays as Queued and does not run:
C:\PROGRA~1\MATLAB\R2011b\bin\matlab.exe -r myfile;quit
Just discovered that it can run if I choose 'Run only if user is logged on', but I need it to 'Run whether user is logged in or not'. Under the Properties of matlab.exe it says that administrators have Full Control, and I am presently logged in with an administrator account, so can't figure out what the problem is. Any suggestions? Alternatively is it possible to run the XP version of Task Scheduler on Windows 7, since I never ran into these issues?