batch file

G

Guest

Hi,
I have a .bat file that copies a file across the network
to a share. It works fine when i run it from the command
line, but it doesn't when i schedule it to run with the AT
command.

this doesnt work
AT \\SRVRM 12:00 /EVERY:M,T,W,T,F CMD /C \\SERVER\DAILY

any ideas why??
 
J

Jerold Schulman

Hi,
I have a .bat file that copies a file across the network
to a share. It works fine when i run it from the command
line, but it doesn't when i schedule it to run with the AT
command.

this doesnt work
AT \\SRVRM 12:00 /EVERY:M,T,W,T,F CMD /C \\SERVER\DAILY

any ideas why??


The schedule service runs in the context of the System account, which has no
network access.

Use jt.exe, tip 2621 in the 'Tips & Tricks' at http://www.jsiinc.com

If you must use AT, then schedule psexec, tip 4141.


Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 
C

Clay Calvert

The schedule service runs in the context of the System account, which has no
network access.

That isn't necessarily true. It is easy to change the account that AT
jobs run under.

You refer to the schedule service, don't you mean the Task Scheduler
service if you're talking about using JT?

In either case, the schedule service account can be changed in
Services. The Task Scheduler default AT account can be changed under
the Advanced menu item when in the Scheduled Task GUI.

Use jt.exe, tip 2621 in the 'Tips & Tricks' at http://www.jsiinc.com

If you must use AT, then schedule psexec, tip 4141.

If you do this then passwords will be sent in the clear. An
acceptable risk for some but it is worth mentioning.

Clay Calvert
(e-mail address removed)
Replace "W" with "L"
 
J

Jerold Schulman

If you look at HKLM\System\ccs\Services\Schedule
you will see that the Schedule service has a Display Name of Task Scheduler

While you can change the Schedule Service account, having it as the built in
System account has a number of advantages, like running in the highest local
privlege, running in the background, not having to change the service account on
1000 computers, etc...



That isn't necessarily true. It is easy to change the account that AT
jobs run under.

You refer to the schedule service, don't you mean the Task Scheduler
service if you're talking about using JT?

In either case, the schedule service account can be changed in
Services. The Task Scheduler default AT account can be changed under
the Advanced menu item when in the Scheduled Task GUI.



If you do this then passwords will be sent in the clear. An
acceptable risk for some but it is worth mentioning.

Clay Calvert
(e-mail address removed)
Replace "W" with "L"


Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 
C

Clay Calvert

If you look at HKLM\System\ccs\Services\Schedule
you will see that the Schedule service has a Display Name of Task Scheduler

Right, but the executable for the Task Scheduler is MStask.exe and not
Schedule.exe which is used by the _Schedule_ service. Also, in
Services it is referred to as the Task Scheduler.
While you can change the Schedule Service account, having it as the built in
System account has a number of advantages, like running in the highest local
privlege, running in the background, not having to change the service account on
1000 computers, etc...

I'm not denying that there are plusses (and minuses) to using the
System account, but that still doesn't mean that the schedule service
only runs in the context of that account.
Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com

Clay Calvert
(e-mail address removed)
Replace "W" with "L"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top