Scheduler Running When Not Logged In Questions

S

srm

I set up my scheduler on my desktop to run a batch fle that does
backups each day. When I leave to go home, I log off and take my
laptop home.

At home, I complete a Remote Desktop Connection. If I happen to be
logged in when the task starts, I see the task appear and run.

If the task starts and then I log in after it has already started, will
the task continue running and will I see it? I'm guessing not since
its probably running hidden, but wasn't sure. I do have the task setup
to run when not logged in. Will checking view hidden tasks in the
scheduler window allow me to see this item running?

Thanks

Shawn
 
P

Pegasus \(MVP\)

You should run the backup job under an account other
than your login account so that it becomes independent
of any logon/logoff action.
 
S

srm

Thanks. I will try that. However, its not even working when I run it
under my account. As a test last night, I logged off remotely prior
to the task starting. This morning I got the following results:

"SRM - Daily Backup of Data (RSYNC SRMDATA).job"
Started 1/27/2006 9:15:00 PM
"SRM - Daily Backup of Data (RSYNC SRMDATA).job"
Finished 1/27/2006 9:15:07 PM
Result: The task completed with an exit code of (c).

I did some searching and did check the "Allow service to interact with
desktop" option in the task scheduler server. I disabled the service,
resarted it, tried to see if it ran again with not being logged in and
same results.

Any ideas? If not, I'll post as a new question but also complete some
searchers to see if someone else has the same problem.

Shawn
 
D

Dave Patrick

Check Event Viewer for error details. Make sure the Task Scheduler service
is set to logon with the Local System Account and Allow Service to Interact
with Desktop

If the task doesn't work then you'll probably want to backup a little and do
some trouble shooting. Where is the task scheduled? Laptop? or on the
terminal server?

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Thanks. I will try that. However, its not even working when I run it
| under my account. As a test last night, I logged off remotely prior
| to the task starting. This morning I got the following results:
|
| "SRM - Daily Backup of Data (RSYNC SRMDATA).job"
| Started 1/27/2006 9:15:00 PM
| "SRM - Daily Backup of Data (RSYNC SRMDATA).job"
| Finished 1/27/2006 9:15:07 PM
| Result: The task completed with an exit code of (c).
|
| I did some searching and did check the "Allow service to interact with
| desktop" option in the task scheduler server. I disabled the service,
| resarted it, tried to see if it ran again with not being logged in and
| same results.
|
| Any ideas? If not, I'll post as a new question but also complete some
| searchers to see if someone else has the same problem.
|
| Shawn
|
 
S

srm

Thanks. Last Event was on 01/25/06. Nothing on 01/28/06 under
Application, Security or System. I verified the Task Scheduler service
is set to logon with the Local System Account and Allow Service to
Interact with Desktop. Still no luck.

I know the password is OK as I watch it run when logged in

Task is scheduled on my desktop at my office. I'm using Remote Desktop
Connection to run off my desktop computer. On my laptop, I have a bare
bones Windows only computer and run all programs / data from my
desktop.

Shawn
 
D

Dave Patrick

If the job connects to another machine you may need to add the user/ group
'logon as batch job' rights (server side). Control Panel|Admin Tools|Local
Security Policy\Local Policies\User Rights Assignments
"Log on as a batch job"

Remember that if it involves network resources to make sure the user account
has permissions to the resources and also use UNC paths as mapped drives
won't exist when no one is logged on.

This article might have helped but is now unavailable. I bugged this so
hopefully it will be back soon.

Result Codes in Scheduled Tasks Indicate an Error Occurred in the Task
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q267031

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Thanks. Last Event was on 01/25/06. Nothing on 01/28/06 under
| Application, Security or System. I verified the Task Scheduler service
| is set to logon with the Local System Account and Allow Service to
| Interact with Desktop. Still no luck.
|
| I know the password is OK as I watch it run when logged in
|
| Task is scheduled on my desktop at my office. I'm using Remote Desktop
| Connection to run off my desktop computer. On my laptop, I have a bare
| bones Windows only computer and run all programs / data from my
| desktop.
|
| Shawn
|
 
S

srm

Thanks. I did check the "Log on as a batch job" setting and the user
was listed.

I think I found the problem - maybe. As a test, I created a simple
XCOPY command and it worked fine when logged off.

My current batch file uses "rsync". I think when I'm not logged in, it
cannot run "rsync". Thats the only difference I can see.

The reason I went with "rsync" is that I had trouble with the RMDIR
command. I had the batch file setup to remove all directories and then
copy the data back over using XCOPY. When I ran my batch, however,
RMDIR did not remove all the directories. I had to run the RMDIR
command four times and each time additional directories were removed
until after the fourth time the all folders were removed. Why, I don't
know nor could I find and documentation concerning this as a possible
issue with RMDIR.

Either I run RMDIR multiple times (unless there is a fix that maybe you
know about) or get rsync to work when not logged in (if possible).

Shawn
 
D

Dave Patrick

Probably the directories were not empty. You may need to take a look at how
you're traversing the folder structure.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Thanks. I did check the "Log on as a batch job" setting and the user
| was listed.
|
| I think I found the problem - maybe. As a test, I created a simple
| XCOPY command and it worked fine when logged off.
|
| My current batch file uses "rsync". I think when I'm not logged in, it
| cannot run "rsync". Thats the only difference I can see.
|
| The reason I went with "rsync" is that I had trouble with the RMDIR
| command. I had the batch file setup to remove all directories and then
| copy the data back over using XCOPY. When I ran my batch, however,
| RMDIR did not remove all the directories. I had to run the RMDIR
| command four times and each time additional directories were removed
| until after the fourth time the all folders were removed. Why, I don't
| know nor could I find and documentation concerning this as a possible
| issue with RMDIR.
|
| Either I run RMDIR multiple times (unless there is a fix that maybe you
| know about) or get rsync to work when not logged in (if possible).
|
| Shawn
|
 
S

srm

Forgot to ask is there a limit size for the path? This is what I am
seeing:

\\server1\shawnm\SRMDATA\COMPE~OH\Product\PHA-P~LM\PHA-P~IO\imsicap_0170.bmp
The system cannot find the file specified.

The above is 76 characters so I'm sure the full path is much longer.

The file copied over fine and when I ran RMDIR a few times it
eventually got deleted.
 
D

Dave Patrick

If the issue is intermittent then it is sounding like a network issue.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Forgot to ask is there a limit size for the path? This is what I am
| seeing:
|
|
\\server1\shawnm\SRMDATA\COMPE~OH\Product\PHA-P~LM\PHA-P~IO\imsicap_0170.bmp
| The system cannot find the file specified.
|
| The above is 76 characters so I'm sure the full path is much longer.
|
| The file copied over fine and when I ran RMDIR a few times it
| eventually got deleted.
|
 
S

srm

I gave up on Rsync and RMDIR so I thought I would try built in
software. I just tried using XPs Backup Software. Works fine when
logged in. When logged out, I get the follwing:

"Signatures.job" (ntbackup.exe)
Started 1/28/2006 4:56:05 PM
"Signatures.job" (ntbackup.exe)
Finished 1/28/2006 4:56:07 PM
Result: The task completed with an exit code of (1f).

What am I missing?

Shawn
 
D

Dave Patrick

This article may help. Also make sure the account used is passworded.

http://support.microsoft.com/default.aspx?scid=kb;en-us;311866

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
|I gave up on Rsync and RMDIR so I thought I would try built in
| software. I just tried using XPs Backup Software. Works fine when
| logged in. When logged out, I get the follwing:
|
| "Signatures.job" (ntbackup.exe)
| Started 1/28/2006 4:56:05 PM
| "Signatures.job" (ntbackup.exe)
| Finished 1/28/2006 4:56:07 PM
| Result: The task completed with an exit code of (1f).
|
| What am I missing?
|
| Shawn
|
 
S

srm

Thanks. I'll take alook at that document.

I got it to work with using the backup software and Rsync, unattended,
however it only works when saving the file on the local hard drive. It
does not work saving the files on the network. I've tried using UNC
and mapped letters when saving the files. I am an andin both on the
domain and local with ny user name.

Shawn
 
D

Dave Patrick

Check that the user account has permissions to the resource and that logon
as batch job is allowed. Check the Event logs server side for errors.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Thanks. I'll take alook at that document.
|
| I got it to work with using the backup software and Rsync, unattended,
| however it only works when saving the file on the local hard drive. It
| does not work saving the files on the network. I've tried using UNC
| and mapped letters when saving the files. I am an andin both on the
| domain and local with ny user name.
|
| Shawn
|
 
S

srm

Thanks:

YOu said "Checked that the user account has permissions to the
resource" - Not sure what you mean here. I am an admin and have full
rights to everything on my local drive and on the network with my user
name. No limitations.

Check the allowed as batch job and I am listed and no event logs since
1/25/06.

I tried it last night. I logged off. The scheduler ran fine with
creating the backup files on the local hard disk. It has to be some
network security thing - maybe :)))

Shawn
 
D

Dave Patrick

:
| Thanks:
|
| YOu said "Checked that the user account has permissions to the
| resource" - Not sure what you mean here. I am an admin and have full
| rights to everything on my local drive and on the network with my user
| name. No limitations.
* The resource being the target machine on the network. The user account
being the account you used to schedule the task with. (also must be a
passworded account)



| Check the allowed as batch job and I am listed and no event logs since
| 1/25/06.
* On the target machine.


| I tried it last night. I logged off. The scheduler ran fine with
| creating the backup files on the local hard disk. It has to be some
| network security thing - maybe :)))
* Yep, I would agree.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
 
S

srm

Thanks - Checked the permission resource and event log (both machines)
and all OK.

Did some more tests this moring and it now seems to work with the
Backup software (at least for now). Why, I really don't know. All the
suggestions and changes that were note above, I changed back to the
original settings to see if any of those suggestions were the
reason(s). It is working with the original settings. I did not even
check have Local System Account and Allow Service to interact with
Desktop checked in the task manager service.

I got the backup software to work with saving to UNC (\\server\<user
name>). Maybe I never tried it using UNC, but it does not like mapped
letters when not logged in.

When logged in, I can run DOS commands, rsync, and the backup software
using mapped letters and UNC saving data to the network and my local C
drive. No problems.

When NOT logged in...

....I can run the DOS commands using mapped letters and UNC saving data
to the network and my local C drive.

....with rsync, I can save to the C drive, but mapped letters do not
work. I think there is a way to make rsync work with UNC, but could
not figure out the command.

....with the backup software, I can save to the C drive, however, mapped
letters do not work, but the UNC does seem to work.

If there is a problem, I don't know. Maybe whant I'm running into is
unique to my computer / network.

I greatly appreciate everyone who helped and provided me feedback.
Thank you.
 
D

Dave Patrick

No, none of these issues are unique. I mentioned that mapped drives won't
natively exist when no one is logged on much earlier in this thread and that
you should use UNC paths. If the service account information is incorrect
for the "Task Scheduler" service then nothing will work correctly.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Thanks - Checked the permission resource and event log (both machines)
| and all OK.
|
| Did some more tests this moring and it now seems to work with the
| Backup software (at least for now). Why, I really don't know. All the
| suggestions and changes that were note above, I changed back to the
| original settings to see if any of those suggestions were the
| reason(s). It is working with the original settings. I did not even
| check have Local System Account and Allow Service to interact with
| Desktop checked in the task manager service.
|
| I got the backup software to work with saving to UNC (\\server\<user
| name>). Maybe I never tried it using UNC, but it does not like mapped
| letters when not logged in.
|
| When logged in, I can run DOS commands, rsync, and the backup software
| using mapped letters and UNC saving data to the network and my local C
| drive. No problems.
|
| When NOT logged in...
|
| ...I can run the DOS commands using mapped letters and UNC saving data
| to the network and my local C drive.
|
| ...with rsync, I can save to the C drive, but mapped letters do not
| work. I think there is a way to make rsync work with UNC, but could
| not figure out the command.
|
| ...with the backup software, I can save to the C drive, however, mapped
| letters do not work, but the UNC does seem to work.
|
| If there is a problem, I don't know. Maybe whant I'm running into is
| unique to my computer / network.
|
| I greatly appreciate everyone who helped and provided me feedback.
| Thank you.
|
 

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