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


bmoore
2014-03-07T08:31:43Z
Hello,

I'm having trouble with setting up some of my scheduled jobs in VisualCron.

I have tasks that are run with relatively simple batch files, and on the server where VC is running, these can be executed directly and run as expected.

When I try to launch the batch files with a VisualCron job, though, they seem to launch successfully, then show some of the expected output, but many of the desired actions fail/do not happen.

More specifically, one of these tasks launches a Python script which does get triggered (it reports its start & end diagnostics faithfully), but it fails to find and load certain files for data parsing. Again, running the script directly loads files fine and they get parsed and pushed into our database.

A common thread between the two tasks that are having issues (batch file calling python, and a batch file calling a C# executable with parameters) is accessing network directories rather than local files. However, I have other jobs (Robocopy, XXcopy) triggered by VC that handle network shared directories just fine.

I've got domain credentials entered (not local) for the same account I'm using for manual tests. I've tried foreground and background execution. I've tried managed code and run with api.

Are there any other launch settings I can try to get these batch files behaving like they do when I launch them manually?

Thanks,
Brendan
Sponsor
Forum information
Support
2014-03-07T10:15:32Z
Here are some pointers about batch files and VisualCron.

1. Because of VisualCron exists in a context with no network access etc you need to use a Credential for the remote server if the actual file is located on a network drive. The Credential needs to have "local login" unchecked if so
2. always use full pahts to the bat file and in all commands within the bat file. Those paths must be of UNC path format if located on another network share. You must not use logical drives like X:\
3. when troubleshooting try placing the batch file locally first and run without credential. Furthermore, please add debugging by writing to a log file for each line so you see where exactly the problem is
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
bmoore
2014-03-09T08:56:49Z
Henrik,

Thanks very much for the suggestions. The credentials I was using are domain credentials that have the necessary access to all servers.

You were absolutely correct about the UNC paths. While I was using full paths, I had not considered logical drive letter references as an issue. I have tested both the affected python and C# programs with logical drives replaced with UNC paths and they now behave as expected/intended.

Thanks again for the quick reply. Sorry it took me a couple of days to get all the testing done and reply back.

Cheers.
Support
2014-03-09T12:49:35Z
Thanks for the feedback!
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top