Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


paulnus
2012-07-31T19:38:16Z
I'm attempting to run a program on a remote machine using the remote execute task in VisualCron. The program in question is a syncing software program that syncs an FTP/SFTP directory with a location on network/disk.

Its actually a great little program but I am having difficulty writing to a UNC path (or mapped UNC path for that matter) when I run it as a remote script. It works fine if the program is installed on the same server as VisualCron and ran as a execute task.

Unfortunately, my VisualCron server is running close to 100% CPU due to an influx in the number of jobs I need to run with this syncing software. I really want to get this working on another server (using remote execute) to offload the CPU cycles that uses to another box. Not only that, i don't want that syncing software to bring down my other scripts.

What is actually happening is that when the sync runs normally, it tries to identify that the folder/files its trying to sync exist and create said folders/files if they do not exist or have been altered.

Like I said, it works fine as a execute task on same box as VC. When I run it remotely, it fires the script properly but it does not identify the folder/files as existing and tries to create them again. Upon attempting the first folder creation, it throws an error because the folder already exists.

The user I have running the remote task is a network credential. The network user has administrator access to the machine. I attempted to run the task where the user has "local" checked and unchecked in the credentials screen. I always have "load profile" checked. Not sure if that's really an issue because I'm using UNC paths.

I've tried running the program using a BAT file and the "net use" command to map drives before running the program to no avail.

Any thoughts here?

The log files for my syncing software just tell the story of not finding the folder at the UNC path (even though it exists). Weird.
Sponsor
Forum information
paulnus
2012-08-01T17:42:35Z
On a whim, I tried another remote execute task with a different program that accesses data from a UNC path.

7/31/2012 2:13:27 PM,Error Starting IMPORT-1,
Job: TMC Weekly DTI 1 Files Task: IMPORT-1 List: TMC Weekly (Sublist) Command: n/a Line: n/a 
Cannot open the file '\\GFCETLPROD\processing_2\tmc_weekly_mail.csv'. Access is denied (5)


Feels like I got something wrong here.

Im using the 2nd Smatbatch user for these tasks. Both do not work.
paulnus attached the following image(s):
Support
2012-08-01T18:13:44Z
Local login and Load profile options should not matter when using Remote execute. I think the problem is security settings of the user - not sure which though. Perhaps you can map it temporary in the batch file when executing the script?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
paulnus
2012-08-02T17:19:47Z
Just so I understand correctly, the current remote execute command is something like.

C:\Program Files\Program.exe

You want me to create a bat file which does the same thing but instead map a UNC path to a drive letter and connect drives using the net use command?
Support
2012-08-02T22:30:20Z
Exactly, use the NET USE command in a batch file before starting the executable.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
paulnus
2012-08-06T16:52:27Z
I had done this before and got same results but wanted to be sure and tried it again. Yet, same problem.

I tried to just write hello world in the bat file to the mapped drive (as well as UNC).


net use p: \\share\namespace /USER:"srv\user" xxxxxxx
echo Hello world! >> "P:\Production\Some\Path\test.txt"
net use p: /delete


When I run it manually from the remote server it works.

When I run it in VisualCron using remote execute I get the following error.

The system cannot find the file specified.Exception in Task: Non zero exit code


The bat file runs from the following location:

Quote:

C:\Bat\Test.bat




Hmmmm.
Support
2012-08-08T11:09:45Z
I am not sure where the permission problem is. I just tried the same on a Windows 2008 machine and it worked.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
paulnus
2012-08-08T19:09:53Z
Okay, Ill ask around and get some more info. Thanks for digging into this. Ill report back what I find.
Scroll to Top