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


Sovi
  •  Sovi
  • No customer Topic Starter
2008-05-13T15:05:03Z
Hi there

I'm having a problem with Incorrect Functions under the results for my jobs. [-o<

I've already tried to create credentials as pointed out in -> http://www.visualcron.co...lt.aspx?g=posts&t=43 . But sadly I still get the message. Even with this message the job still executes perfectly.

Jobs include opening of custom batch files and execute commands with arguments.

UserPostedImage 

Thanks,
Sovi
Sponsor
Forum information
Support
2008-05-13T15:36:29Z
Incorrect function could be anything as it is one of the first basic windows exit codes. Usually, when regarding VisualCron this is related to permissions or execution context.

Also, as you describe the Job may execute perfectly. That is becuase when running it normally when double clicking on the batch file all errors are taken care of in the background.

What I would do is to break down the code. The line that produces the error is probably at the end as your code succeds. So, please remove line by line to see which row generates the error - and please share it with us.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Sovi
  •  Sovi
  • No customer Topic Starter
2008-05-13T15:54:17Z
Hi thanks for the fast reply, here's an example.

---- Batch File -----

cd \
cd c:\pl570\procs\

%systemroot%\system32\ping -n 5 127.0.0.1 >nul
%systemroot%\system32\ping -n 5 127.0.0.1 >nul

$portup.cmd A

---- Job Details ----

UserPostedImage 

I understand that the final line is what causes the error but I don't understand how, this command simply opens a new window executes and closes the previous screen. Is the incorrect function related to the means this command closes the window?

If so is there any way to bypass it?
Support
2008-05-13T15:57:22Z
This could cause a problem as VisualCron runs in the background as a Service and cmd-window is a way of interaction that is not fully allowed. What you can do instead is to use a foreground execution mode which lets you do these kind of things.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Sovi
  •  Sovi
  • No customer Topic Starter
2008-05-13T16:00:39Z
I'll give it a shot thanks

// Edit - Sucess - Thank you for your efforts - I'll update this thread if I have any more problems in this regard, lots to do.

Sovi =d>
Sovi
  •  Sovi
  • No customer Topic Starter
2008-05-13T16:35:07Z
Intresting the job is succesful all green... almost, but there's a long delay (+- 20 secs) per task and the last task never stops running :?

I removed all the delays I had previously
Support
2008-05-13T20:58:30Z
It is hard to say (from here) if it is something in the script or a setting in VisualCron.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Sovi
  •  Sovi
  • No customer Topic Starter
2008-05-14T12:24:30Z
The script is exactly the same as before. Tried the following:

Remove the timeout.
Change the timeout to 1 second.
Change credentials.

No progress, they work but its pretty slow, what exactly does foreground execution mode do?
Support
2008-05-14T13:26:42Z
But you said last task never finishes - or does it finish - but later?

Foreground execution context executes through the VisualCron Tray Client. It is an extra roundtrip but we are talking about milliseconds for that. Only thing I can think of is that the exe runs in a different environment which allows other functions (UI gives some extra overhead) or something like that.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Sovi
  •  Sovi
  • No customer Topic Starter
2008-05-14T13:35:41Z
the final task does finish, just takes a horribly long time. Here's the log - as you can see the last task errors.

UserPostedImage 
Support
2008-05-14T13:45:33Z
What may be interesting to know is that foreground execution is dependant on desktop access. So, it must login in order to access the desktop (when you are not logged in). Apparently, it seems to have some kind of problem with that. Perhaps something wrong with the specified Credentials.

Can't you do a background execution but do the failing command in some other way?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Sovi
  •  Sovi
  • No customer Topic Starter
2008-05-14T13:49:46Z
Support wrote:

Can't you do a background execution but do the failing command in some other way?



I'm not sure I understand? Do you want me to make a foreground execution with a task that will defenatly give me an error back?
Support
2008-05-14T13:52:38Z
If you get the error in both foreground and background Execution you should go for background execution and fix the error.

Foreground execution is the last option. You want to optimize execution. Foreground execution should only be used where you can't use background execution.

Currently it seems like you have problems with both foreground and background.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Sovi
  •  Sovi
  • No customer Topic Starter
2008-05-14T13:54:31Z
I'll work on it abit more and get back to you
Users browsing this topic
Scroll to Top