Task Manager Matlab error XP PRO SP3

  • Thread starter Thread starter Seiya
  • Start date Start date
S

Seiya

Hello,

I have scheduled some Matlab Jobs on Windows Task Manager.
Sometimes this job doesn't start (without return any error) and i have to
start them manually.
I'm using Windows XP PRO SP3.
How can i resolve this error?

Thanks in advance

Cheers
 
Seiya said:
Hello,

I have scheduled some Matlab Jobs on Windows Task Manager.
Sometimes this job doesn't start (without return any error) and i have to
start them manually.
I'm using Windows XP PRO SP3.
How can i resolve this error?

http://www.mathworks.com/support/
http://www.mathworks.com/matlabcentral/

Did you ever take the command you run by the scheduled task and enter it
at a command prompt to see if that command actually works?

Are you running it under an account that has whatever permissions are
needed by that program?
 
Yes Job works, I've testing it carefully, but sometimes the scheduled task
doesn't start.
Account involved have administrator's privileges and this thing happened
randomly without returning any error.
I also send a Bug Report to Matlab and they answer me that this error
doesn't depend from the program.

Cheers


Assistenza Tecnica Fida Informatica s.r.l. Società a socio unico Via Caboto,
38 - 10129 Torino Tel. 011.5813777 - Fax 011.5813741
(e-mail address removed) www.fidainformatica.it P.IVA 10190390012
Reg.Imprese di Torino n. 10190390012 REA To-1113013 Capitale sociale ?
30.000,00 i.v.
 
Yes Job works, I've testing it carefully, but sometimes the scheduled task
doesn't start.
Account involved have administrator's privileges and this thing  happened
randomly without returning any error.
I also send a Bug Report to Matlab and they answer me that this error
doesn't depend from the program.

Cheers

Assistenza Tecnica Fida Informatica s.r.l. Società a socio unico Via Caboto,
38 - 10129 Torino Tel. 011.5813777 - Fax 011.5813741
(e-mail address removed) 10190390012
Reg.Imprese di Torino n. 10190390012 REA To-1113013 Capitale sociale ?
30.000,00 i.v.
"VanguardLH" <[email protected]> ha scritto nel messaggio

Since you seem to have had your working at some point not all of this
applies to you. It sounds like you just need some help
troubleshooting STs - they all work perfectly as designed but perhaps
not always as desired.

If it doesn't start "sometimes" there is a reason. There is always a
reason.

Here is some along winded help about STs for folks that are just
getting started with STs. Someday I will have to rewrite this copy/
paste.

Be sure your ST credentials use a user account that has a password.
Learn how to locate, browse and recreate a fresh scheduled task log
file (your answer is probably there)
Verify your ST mechanism works properly by creating a simple task.
If the time has come and your ST has not run, the answer is in the log
file.

Not so popular advice from me to troubleshoot Scheduled Tasks:

It is strongly suggested that the task be assigned to a user that has
a password (not the Administrator), so create a new user with a
password just for tasks or add a password to your account if needed.
You can temporarily assign yourself a PW to test and worry about this
later. Right now you just need to see if your ST mechanism is working
properly.

If you set up the task to use the same account you log in with, you
may see the task launch and start running while you are using the
computer.

If you set up the task to use a different account than the one you log
in with
the task should still run (and you will not see it), but for testing,
use
your login account and then change the account the task uses when you
are sure
it works.

If you try to create new task using an account that does not have a
password
you will get this error trying to create the task:

The new task has been created, but may not run because the account
information
could not be set. The specific error is 0x80070005: Access is denied

The task will still be created, but will not run properly.

There is a way around this, but get this working first to be sure your
ST
mechanism is not afflicted.

Stop the Task Scheduler service. Click Start, Settings, Control Panel,
Administrative Tools, Service and locate the Task Scheduler Service
and
stop it.

Delete or rename the probably cluttered ST log file which is here:

c:\windows\schedlgu.txt

Restart the Task Scheduler service to create a new log (it is just a
text
file) and verify that a new log file has been created and looks
something
like this:

"Task Scheduler Service"
Started at 1/1/2010 6:26:43 AM
[ ***** Most recent entry is above this line ***** ]


Navigate to the c:\windows\tasks folder to see all your tasks. Expand
the
explorer window so you can see all the columns of interest dragging
the
column headings to see each column.

The Next Run Time, Last Run Time, Status and Last Results columns
are of interest. You can also click Advanced and view the ST log file
from here.

Choose to Add Scheduled Task. Create a new task to run Command
Prompt
once, right now. If you don't have a PW on your account, you will
get
an error trying to create it (more on that later). It will still be
created,
but will never run. Assign a password to your account at least
temporarily
to test your ST mechanism.

Having temporarily assigned your login account a password, adjust the
new ST Command Prompt task to use the same account and password you
used
to login to Windows and the task should configure with no errors.

Right click the new Command Prompt task and choose Run and a command
window should open immediately. If not, something is wrong. If yes,
your mechanism is sound. Look in the log file to see your results.

Since the Command Prompt task is set up to run under your account,
this
is whey you will see the Command Prompt window open right away. If
you
configured the task to use some other account (with a password of
course),
the Command Prompt task would run under that users name (not yours)
and you
would not see the Command Prompt window open, but the task would be
running
and you can see it in Task Manager. This way you know your ST
mechanism is
working.

You know how to run tasks manually, observe the information columns,
remove the log
file, so now apply this knowledge to your new task. Be sure the Task
Scheduler service
is running again if you stop it to remove the log file while testing.

Assign Properties to your new or troublesome task that match your
login (at least for
testing), observe the columns, and the log. If your task fails to run
manually, the
errors in the log file are the clues to what to do next.

Always try to go back to your simple Command Prompt task that you
created before to make
sure the ST mechanism works properly - you know for sure that one
works. Then apply your
knowledge to get your new task working.

You can change the task Properties to use your login account and
password since you know it
works properly on the Command Prompt task. If you change your new
task and choose to run it
and are logged in the same way, you should see your task run. When
you are satisfied it
is working properly, you probably don't want to have it interrupt you
while you are logged
in, so change the Properties back to use some other user login and
password that you created
just to run STs.

Some tasks that are created by other applications will use the special
account
NT AUTHORITY\SYSTEM. This account has no password and is usually used
for system
oriented tasks but you will only be able to see it running when using
Task Manager.
If you try to manually run a ST like this, you will not see it open
any window to run
but you will see it running in Task Manager and in the log file. If
you think you
want to see it actually run, change the Properties to use your account
and password,
troubleshoot the task, then change the Properties back and test it
again.

These kinds of tasks may run just fine, but you will only be able to
tell by the log file,
looking in Task Manager or the status columns in the tasks folder. If
you temporarily change
the task to use the same account and password you use to login, you
will be able to watch
it run.

Once you understand how to get a simple task like Command Prompt
working and you know
where the log file is and how to change the task Proprieties, you can
work on your new or afflicted
task and get it working.

There are ways to work around some of the restrictions and
requirements, but it is
best to just use what you have and use it properly.

A common problem with STs is no password on the account used to create
the task or folks expect to
"see" the task running when it is not assigned to their login and
don't see anything and think
the task is not running. That is not the way it works. The log file
will tell you what is
going on.

If you are used to not having a password on your account because you
don't like to enter one when
you login or you are the only user on your system, and decide to start
using some STs, it is sometimes
easiest to just assign a password to your account or just create a new
XP user account with a password
and use it for the STs. You can assign a password to your account and
still have your system set up
to never prompt you for a password when you login but you should
remember your password - or set up
a new account.
 
Seiya said:
VanguardLH ...


Yes Job works, I've testing it carefully, but sometimes the scheduled
task doesn't start. Account involved have administrator's privileges
and this thing happened randomly without returning any error. I also
send a Bug Report to Matlab and they answer me that this error
doesn't depend from the program.

Look in the log file for Task Scheduler (Advanced -> View Log menu) to
see what error it got back when it tried to run the scheduled event.
The log file rolls over so the end of the logging is not necessarily at
the end of the file.
Assistenza Tecnica Fida Informatica s.r.l. Societ� socio unico Via Caboto,
38 - 10129 Torino Tel. 011.5813777 - Fax 011.5813741
(e-mail address removed) www.fidainformatica.it P.IVA 10190390012
Reg.Imprese di Torino n. 10190390012 REA To-1113013 Capitale sociale ?
30.000,00 i.v.

Learn to properly configure your newsreader. Unless you want your posts
seen as spam, put the spam or ego fluff into a signature. That means
using the sigdash delimiter line ("-- \n") to delineate the start of
your signature.
 
Thanks for helping, i troubleshoot very carefully but i haven't resolved it
yet.
I checked ST log and the task doesn't appear on it when it randomly doesn't
run.
LAN on the PC is always on and every Matlab Task have a domain account
password.
Other task, for example a batch backup job, runs correctly instead of Matlab
job that sometimes doesn't start.
I think that there is a kind of incompatibility between third party
application job and Windows Task Scheduler.
I've found a Hotfix on Microsoft.com for this problem but it is included on
SP2 and on the pc is installed SP3.
Thanks Vanguard for signature's tip.

Cheers
 
Thanks for helping, i troubleshoot very carefully but i haven't resolved it
yet.
I checked ST log and the task doesn't appear on it when it randomly doesn't
run.
LAN on the PC is always on and every Matlab Task have a domain account
password.
Other task, for example a batch backup job, runs correctly instead of Matlab
job that sometimes doesn't start.
I think that there is a kind of incompatibility between third party
application job and Windows Task Scheduler.
I've found a Hotfix on Microsoft.com for this problem but it is included on
SP2 and on the pc is installed SP3.
Thanks Vanguard for signature's tip.

Cheers

Stop the Scheduler Service and delete the schedlgu.txt log file,
restart the service to create a new log file (as mentioned before).

Take a look at the Properties of your afflicted task and adjust the
parameters so it is 5 minutes in the future to start.

In explorer, browse to c:\windows\tasks and maximize the window and
adjust the columnar display so you can see:

Last Run Time, Next Run Time, Status, last Result

Enjoy a cool beverage for 6 minutes.

If 6 minutes goes by and you feel your task has not started, report
the results of the columns and then open the log file and copy/paste
the results here. Don't post a bunch of stuff from other tasks long
ago. The log file should be new, fresh and small.

Can anyone get this command to work without an exception error:

schtasks /query /v
 
Seiya said:
I checked ST log and the task doesn't appear on it when it randomly
doesn't run. LAN on the PC is always on and every Matlab Task have a
domain account password. Other task, for example a batch backup job,
runs correctly instead of Matlab job that sometimes doesn't start. I
think that there is a kind of incompatibility between third party
application job and Windows Task Scheduler. I've found a Hotfix on
Microsoft.com for this problem but it is included on SP2 and on the
pc is installed SP3.


What is the state (enabled or disabled) for the following option in the
scheduled event?
_
|_| Run only if logged on

If that option is enabled then the event can only run when you are
logged on. If disable, you must specify the account (Run As) under
which that event will run.

Check your power options. Maybe your computer is configured to power
down, hibernate, or go into standby mode. Besides not being able to
start jobs under these low-power states, the network interface might
also be disabled at those times. So configure your power options to
never go into a low-power mode and retest. Otherwise, you need to
enable the option in the scheduled event to wake your computer in order
to run the task.

If you are using a mapped drive to get at the program or its files then
perhaps your host isn't connected to that networked drive at the time
the scheduled tasks will run. The file server can terminate idle
connections to it to eliminate users that have been sloppy in leaving
those connections open for no purpose. Don't use mapped drive
designators (D:, M:, S:, or whatever drive letter you used in mapping a
drive letter to a networked drive). Instead use UNC path names, like
\\server\path to access the program.

The Task Scheduler merely runs the same command that you could enter at
a command prompt. So it is likely the state of your computer at the
scheduled time is what causes the program to not be executable.
 
@Jose: I Stopped ST service and recreated a new log file then i
restarted it. All ST columns are clearly visible so, if the error appears
again, i'll post it here.

@Vanguard: "Run only if logged on" is disabled, PC goes on Stand-By Mode
after 15 Mins of inactivity, so i checked "Wake your computer in order to
run the task" option.
No mapped drive is used.

Now I'm doing some test to check the job.
Thanks a lot
 
Back
Top