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


Joppes
2014-05-21T08:57:08Z
I'm new to VisualCron, and testing some stuff to see if we can use it at our company for different batch job needs.

I'm building a job that writes an XML file to disk, and one of the first steps is to write the basic XML file structure using "Write File" task, and after that I use the "XML create node" task to populate the XML file with data.

The problem I noticed is that I write a file with timestamp in the filename, E:\Exports\Switches\{DATEFORMAT(yyyyMMdd)}\{JOB(Active,Variable,SwitchIP)}-{DATEFORMAT(yyyyMMddHHmm)}.xml, with the Write File task.

So the file might be named: 192.168.56.3-201405211105.xml

After that I run steps using the "XML create node" task to add stuff to the file, so if I refer to E:\Exports\Switches\{DATEFORMAT(yyyyMMdd)}\{JOB(Active,Variable,SwitchIP)}-{DATEFORMAT(yyyyMMddHHmm)}.xml a minute might have passed so the "XML create node" task will not find the file (since it will try to write to a file called 201405211105.xml instead of 201405211104.xml for example).

What is a good way to solve this? It doesn't look like I get the file name as output from Write File?
Sponsor
Forum information
Support
2014-05-21T10:14:31Z
Hi,

the best solution would be to use the Set Variable Task as the first Task. You can then set the value in the beginning which you will later use throughout the Job. What is important is that you check "Translate to constant" so that the Variable you use does not shift in time.

Then you can use this User Variable in the rest of the Tasks.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top