Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scheduled task to copy files fails (works from command line)

Status
Not open for further replies.

raphael75

Programmer
Nov 15, 2012
67
US
We have a PHP script that copies files and folders from a Windows 2008 R2 computer to a Debian Linux webserver. The script works perfectly when run from the command line. However, when we try to run it as a scheduled task, it can't "see" any files or folders on the Windows computer.

I used get_current_user() and when run from CLI or Scheduled Task it returns the same user, so I don't think that's the issue.

Is there something special I need to configure in the scheduled task?

Thank you!
 
Typically a sched task that deals with copying files to remote drives doesn't work as planned, unless you actually provide a mapping to the remote drive and a proper user account that has permissions to the target folder. Modify your script to map the drive with the proper userid/password, then un-map when the copy has completed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top