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


apassy
2008-10-31T19:53:41Z
I've got an execute task and it "completes" as soon as it spawns the program. Is there any way to force it to wait until the program terminates before it registers completion?
Sponsor
Forum information
Support
2008-10-31T21:13:27Z
It should wait, unless you spawn another process through a .bat file or similar or use remote execute Task. So, if you want it to wait until the completion you should launch the .exe directly.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
apassy
2008-10-31T21:38:30Z
I launch the .exe directly in the "command" field, with background execution. Any other ideas?
Support
2008-10-31T21:39:55Z
Does the exe do what it is supposed to do or does ot fail?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
apassy
2008-10-31T21:44:16Z
Does exactly as it is supposed to do.
Support
2008-10-31T21:55:25Z
1. Are you using normal execute or remote execute?
2. Does the exe launch other processes?
3. What kind of exe it is?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
apassy
2008-11-01T00:01:38Z
1. Normal Execute
2. I don't know - see 3.
3. the application is Matlab 
Support
2008-11-01T00:57:37Z
Does the Task have output in the output column?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
apassy
2008-11-03T15:22:57Z
Output = "No Output"
Stderr = "No Output"
Result = "Success"

When it starts, a Dos window flashes then goes away. (Matlab is a GUI program.)
Support
2008-11-03T16:21:07Z
I think the solution to that problem is written in the dos window. It is probably something about permissions. Can you try adding and selecting a Credential (local admin - same as you are logged in as) to the Task?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
apassy
2008-11-03T16:49:20Z
Let's be clear - the program runs just fine.

As for permissions - I had to add my domain id and I have to run it as that, because Matlab checks permissions on a remote license server, and it need to be started up as me to do that. It won't run as localadmin.

Could it be that? the tip for Shell execute notes that you only have to check it if one isn't using credentials, implying to me that if you are, it automatically does a shell execute, in which case, that would be our problem?

Support
2008-11-03T18:28:25Z
You should uncheck "Use shell execute". That is probably the problem.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
apassy
2008-11-03T20:05:19Z
Shell execute is NOT checked.
Support
2008-11-03T20:16:57Z
But what makes you believe that the operation has not finished?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
apassy
2008-11-04T05:42:57Z
because i watch Matlab take 20 minutes to execute a program, and then it exits.
Support
2008-11-04T09:16:32Z
It seems like you are not executing the main program or that matlab "forks" off into new processes. You seem to execute some kind of batch/project file that later matlab is separating from the first process.

The main process is the one that you see in the Task manager (using cpu) after you have started the process. The problem is probably solved if you use the command line/argument differently.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Jake Warner
2017-03-06T20:27:58Z
I'm having somewhat the same problem. I run a task that runs MATLAB with arguments for running a script. It says 'running' and 'completed' right away. No pause. However, the big difference for me is that the task does not actually complete. It is supposed to create a plot and save it. When I run via the MATLAB command line, it runs just fine. When I run via Windows Task Scheduler, it works just fine. In the server log it says:
3/7/2017 7:18:09 AM Info Job started: Jake Macro Carry Spike Check
3/7/2017 7:18:09 AM Info User 'VisualCron Default Admin' - Ran Job: Jake Macro Carry Spike Check
3/7/2017 7:18:09 AM Info Task started(Execute): Execute (71)
3/7/2017 7:18:09 AM Info Task completed (Success)->'Execute' (71)
3/7/2017 7:18:09 AM Info Job completed (Success)->'Jake Macro Carry Spike Check'

This task should actually take about 10 minutes to run.

Any ideas?
Jake
Jake Warner
2017-03-06T21:04:36Z
Got it working!

I had to go into the Execution task and in the Main Settings tab I had to click Execution context and select run in Foreground. Then I clicked Before execution- Logon/Unlock using Credential.
Jake Warner
2017-03-06T21:57:50Z
However, I still cannot fathom why it can't take multiple arguments. I need it to exit after running the script so in the arguments line I put:
-r <script name>, exit

Unfortunately it does not exit MATLAB though. So now I am hard-coding my 'exit' into the script. Other tasks I want to log into different .txt files though, and that isn't working. I'm a little disappointed it isn't working as easily as Windows Task Manager at this point.
Scroll to Top