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


aborgeld
2012-05-25T14:07:34Z
Hello guys,

Since VS 6.10 we got a Incorrect function error.
Can you tell me how to debug this error?

I am thinking of compiling error like quotes or parantheses.
But i can't see where it goes wrong.

We are scripting a batch file. Powershell files are ok.

I have uploaded the script and error, hope to hear from you.

Kind regards,

André
File Attachment(s):
incorrect function.doc (31kb) downloaded 61 time(s).
script.txt (7kb) downloaded 54 time(s).
Sponsor
Forum information
Support
2012-05-26T09:41:56Z
Try the following:

1. open the Credential that you use
2. check "Local login" and "Load profile"
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
aborgeld
2012-05-29T07:09:19Z
I have done that still it stops directly

Incorrect function and

'\\ehrmfs\Scripts$'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
The parameter is incorrect.
Exception in Task: Non zero exit code

The strange thing is that Visual cron does support UNC.

Kind regards,

André
ANWB
Support
2012-05-29T07:22:20Z
This is something about paths and arguments, please try:

* not using a hidden folder ($)
* use full path to your executable (and full paths to yo all lines in the file)

If this batch file has multiple lines you can probably debug which line that fails by writing a log entry for each line. Knowing the exact line that causes the error would help a lot.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
aborgeld
2012-05-29T07:33:27Z
With full path we mean

D:\Scripts instead of \\ehrmfs\scripts


But this batch always worked and now with the new version it doesn't work anymore.
Support
2012-05-29T07:36:13Z
Is ehrmsfs a local drive?

Only thing that is changed is how we (or where) we handle Credentials. And the settings vary if this is a local drive or not and if you are within a domain.

As we do not know anything of your script please add the logging so we at least know which line it fails on.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
aborgeld
2012-05-29T07:45:12Z
It is a cname to a server location i have made the hidden shares not hidden.
Even in the batch, that doesn't work. It doesn't start the batch logging it stops right away in Visual cron with the error in the VS cron log:

29-5-2012 9:38:59 Info Job started: Sociale Cockpit Export
29-5-2012 9:38:59 Info Skipping Condition check because the Job was run manually.
29-5-2012 9:38:59 Info User 'andre Borgeld' - Ran Job: Sociale Cockpit Export
29-5-2012 9:38:59 Info Task started: Sociale Cockpit (40)
29-5-2012 9:38:59 Info Impersonation result 2: True
29-5-2012 9:38:59 Err Exception in Task: Non zero exit code
29-5-2012 9:38:59 Err Task "Sociale Cockpit" exited with code: 1(Incorrect function.)
29-5-2012 9:38:59 Info Task completed: Sociale Cockpit (40)
29-5-2012 9:39:00 Info Job completed: Sociale Cockpit Export
29-5-2012 9:39:37 Debug Saving Jobs

Thanks for your support by the way.

Kind regards,

André
aborgeld
2012-05-29T07:45:51Z
The user that start it is a domain user. And where in one domain.

And this is the new VSC error

'\\ehrmfs\Scripts'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
Access is denied.
Exception in Task: Non zero exit code
Support
2012-05-29T07:46:53Z
Please attach a screenshot of your Execute settings.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
aborgeld
2012-05-29T07:55:44Z
Here you go.
File Attachment(s):
err_visualcron_1.doc (88kb) downloaded 77 time(s).
Support
2012-05-29T07:58:08Z
The problem is probably "Run with managed code". This option is only for a local script. Since your script is on a network drive you need to select "Network credentials only".
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
aborgeld
2012-05-29T08:57:27Z
Well it only has 2 options Run with API code and run under managed code
aborgeld
2012-05-29T08:59:38Z
And in manage credential i still use local and load profile, or do i have to grade this out?
Support
2012-05-29T08:59:59Z
Sorry, it is know controlled in the Credential. "Local login". This should be unchecked. But please switch to "Run with API".
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
aborgeld
2012-05-29T14:22:11Z
Solved.


For your documentation:
With disableUNC in register
Set the job in Managed code
start VScron with the service user.

Thanks for your help.

Kind regards,

André
Support
2012-05-29T14:23:59Z
Hmm.. thanks for the feedback but DisableUNC? Maybe you are talking about UAC? What operative system do you run?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
aborgeld
2012-05-29T14:25:34Z
Operating systeem Windows Server 2008

I meant disableUNCCheck

1.Start a registry editor (e.g., regedit.exe).
2.Navigate to the HKEY_CURRENT_USER\Software\Microsoft\Command Processor registry subkey.
3.From the Edit menu, select New, DWORD Value; enter the name DisableUNCCheck; then press Enter.
4.Double-click the new value, set it to 1, then click OK.
5.Close the registry editor.
6.Log off and log on for the change to take effect.
Support
2012-05-29T14:26:39Z
Thanks, we will read more about that.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
2012-07-13T12:03:52Z
hello,
same problem after upgrade from 6.0.5 to 6.1.2

i have encountered problem with credentials password.
it seems to be resolver after unchecked local login and rewriting the password.

an other big problem is inside a delete file task.

before upgrade this task delete al files and empty subfolder inside the root folder.

now after upgrade delete all files and partially folder.

in particular if a folder contain a file delete the folder.

if the folder contain other folder and this folder contain a file the task delete only the second folder.

please if any one can help me i appreciated.

sorry for my english!!!

Giuliano
Support
2012-07-13T13:24:45Z
Originally Posted by: sistemimail@projest.com 

hello,
same problem after upgrade from 6.0.5 to 6.1.2

i have encountered problem with credentials password.
it seems to be resolver after unchecked local login and rewriting the password.

an other big problem is inside a delete file task.

before upgrade this task delete al files and empty subfolder inside the root folder.

now after upgrade delete all files and partially folder.

in particular if a folder contain a file delete the folder.

if the folder contain other folder and this folder contain a file the task delete only the second folder.

please if any one can help me i appreciated.

sorry for my english!!!

Giuliano



The Credential problem is probably not related. We will continue the discussion we have on email for that.

The delete files Task - this must be a property in your Task setting. Please create a separate post about this and with screenshots of Task settings and folder.

Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top