Windows Server 2000/2003 Thread, Scheduled Task issues 0x2 error in Technical; Hi,
I'm trying to get a scheduled task to run a perl script that performs our backup.
When i run ...
-
15th June 2009, 11:16 AM #1 Scheduled Task issues 0x2 error
Hi,
I'm trying to get a scheduled task to run a perl script that performs our backup.
When i run the script manually (double click) it works fine, and backs everything up properly.
When i schedule it however, it doesn't work and exits with error code 0x2. I've looked on google and this seems to indicate "file not found". I've tried changing permissions, folders and user accounts but it still does this.
My current theory is that it is failing on these use lines at the top:
Code:
use File::Path;
use File::Copy;
but why it works fine when run outside of the scheduled task i don't know!
Can anyone shed any light on why this might be failing?!
-
-
IDG Tech News
-
16th June 2009, 01:56 PM #2 anyone? 
I'm out of ideas now.....
-
-
16th June 2009, 01:58 PM #3 check the password on the schedule.
-
-
16th June 2009, 01:59 PM #4 hi,
i've tried several different users, and put the password in very carefully to check it but still no joy
-
-
16th June 2009, 01:59 PM #5 check permissions on the tasks and on the files, have you used the same user for each
-
-
16th June 2009, 02:01 PM #6 yeah i've checked that. All 3 accounts i used were domain admin accounts, and have full permisisons over the tasks, the backup script folder (and files) and the files to be backed up. Running the script manually (not through scheduled tasks) works fine though
-
-
21st September 2009, 10:50 AM #7 I am getting the exact same problem with a very basic script that maps a drive copies some file and then removes the drive mapping. Again it works fine if I run it by hand and fails if I schedule it.
It started failing on Friday 18th September for no reason at all ??
-
-
21st September 2009, 10:55 AM #8 I'm not quite sure why this happens but it started working when there were no other users logged into the server. Make sure that everyone is logged off the server (remotely or locally) and see if it works then.
-
-
21st September 2009, 10:58 AM #9 I'm aware of an issue on server 2008 whereby if the script has quotation marks in it, it won't run, even if the script works perfectly when run manually. There is more info on it here:
A scheduled task does not run as expected if a command-line argument is enclosed in quotation marks on a computer that is running Windows Server 2008 or Windows Vista SP1
-
SHARE:
Similar Threads
-
By FN-GM in forum Scripts
Replies: 3
Last Post: 2nd May 2009, 07:17 PM
-
By adamf in forum Windows
Replies: 3
Last Post: 1st December 2008, 12:00 PM
-
By Stuart_C in forum Windows
Replies: 0
Last Post: 25th November 2008, 11:27 AM
-
By Jobos in forum Windows
Replies: 2
Last Post: 30th April 2008, 03:16 PM
-
By Ste_Harve in forum How do you do....it?
Replies: 2
Last Post: 14th September 2007, 02:04 PM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules