I'm having a challenge running a scheduled task which triggers a batch file that maps a drive.
The batch file runs just fine but when I try to schedule it to run at log on it does not map the drive. I have the privilege set to run at the highest and the task is enabled. When in the task scheduler panel I can click on "run" and the event will trigger off and the status will change from ready to running. At this point the status stays on "running" and never completes.
Your suggestions are appreciated.
Scheduled Task: Batch File
-
- GoldLounger
- Posts: 2640
- Joined: 26 Jan 2010, 16:31
- Location: Southern California
Scheduled Task: Batch File
Regards,
John
John
-
- Administrator
- Posts: 12766
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
Re: Scheduled Task: Batch File
Can you put a PAUSE statement at the end of the batch file and view the output
StuartR
-
- GoldLounger
- Posts: 2640
- Joined: 26 Jan 2010, 16:31
- Location: Southern California
Re: Scheduled Task: Batch File
StuartR,
By adding a PAUSE statement does not change the end result other than requiring the user to "press any key to continue". Running that batch file from a scheduled task just hangs on the "running" status. Double clicking on the batch file does map the drive as expected.
If I recall earlier versions of Windows had a similar challenge. I'm on Windows 11.
By adding a PAUSE statement does not change the end result other than requiring the user to "press any key to continue". Running that batch file from a scheduled task just hangs on the "running" status. Double clicking on the batch file does map the drive as expected.
If I recall earlier versions of Windows had a similar challenge. I'm on Windows 11.
Regards,
John
John
-
- GoldLounger
- Posts: 2640
- Joined: 26 Jan 2010, 16:31
- Location: Southern California
Re: Scheduled Task: Batch File
StuartR,
I got it to work by deleting the questionable task and starting over. I create one to run when logged in. After viewing the scheduled task the status was in the "ready" mode.
I got it to work by deleting the questionable task and starting over. I create one to run when logged in. After viewing the scheduled task the status was in the "ready" mode.
Regards,
John
John
-
- Administrator
- Posts: 12766
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
Re: Scheduled Task: Batch File
StuartR
-
- GoldLounger
- Posts: 2640
- Joined: 26 Jan 2010, 16:31
- Location: Southern California
Re: Scheduled Task: Batch File
I am just as surprised as you. I'm glad it worked though.
Regards,
John
John