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.


ErikC
  •  ErikC
  • Paid support Topic Starter
2011-09-09T06:49:36Z
Hi,

Today I encountered a strange behaviour. I've never seen this before.

I have version 5.7.3 running and the variable {FILE(GetRandomFileName)} gave me an empty result, so it seems.

I have an execute task setup as :

command: cmd
parameter: /c echo {FILE(GetRandomFileName)}
working dir: c:\windows\system32

This will give me an output like: zdo14ahk.40g , everytime a different though.

Today the output was: No output

My other tasks depend on having some output here. Can it be that this variable gives an empty result? If so, could this meganism be changed so it checks itself if it has a value?

In my logs I see that my task is started and is completed, no errors here.

Any ideas why this could happen? I restarted the task and now it gives me real output everytime.

Regards,
Confused Erik
Uses Visualcron since 2006.
Sponsor
Forum information
Support
2011-09-09T06:56:44Z
It is indeed strange. In this case we call a .NET function that gets a random name. There is no way we can an empty value unless the method returns an empty value.

Did the Variables browser give you a value at that time?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
ErikC
  •  ErikC
  • Paid support Topic Starter
2011-09-09T07:06:01Z
Due to the fact that I had to solve the issue first, I can't see the output of the variable anymore.

My next tasks are depending on output of this task and I could see that these tasks gave me the message of missing parameters. The random name is passed as a parameter.

But this doesn't give the answer to the question is the variable was empty. The task output was empty...

I'm now wondering if I need to make a condition to check the output and rerun the task if it's empty, but because I have more jobs setup like this, it's time consuming.

As I said, it never happened before and I can't reproduce it.

You might want to check the .NET value after returning it and recall or make the random string yourself if it's empty.

Or it might something to do with the windows command 'cmd'....

Regards,
Erik
Uses Visualcron since 2006.
ErikC
  •  ErikC
  • Paid support Topic Starter
2011-09-09T07:14:41Z
Funny thing is, If I change my task like this:

command: cmd
parameter: /c echo
working dir: c:\windows\system32

So without the {FILE(GetRandomFileName)}, the output is: ECHO is on.

This contradicts with the assumption that the {FILE(GetRandomFileName)} was empty.

😕

Regards
Erik
Uses Visualcron since 2006.
Support
2011-09-09T07:16:06Z
I would say it is probably almost impossible to reproduce this. If it happens again I would like you to create a File write Task and write the Variable to file instead. Then we can see if there is anything specific with CMD output.

We cannot make any check unless we know there is something with the Variable which is very unlikely.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2011-09-09T07:17:33Z
Originally Posted by: ErikC 

Funny thing is, If I change my task like this:

command: cmd
parameter: /c echo
working dir: c:\windows\system32

So without the {FILE(GetRandomFileName)}, the output is: ECHO is on.

This contradicts with the assumption that the {FILE(GetRandomFileName)} was empty.

😕

Regards
Erik



Then it seems to be something general with either Execute Task output. In that case I would create another Task similar to this one. Really hard to say what could cause this.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top