Jump to content

Recommended Posts

Posted

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:

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?!

Posted
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
  • 3 months later...
Posted

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 ??

Posted
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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...