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.


Guest
2018-02-12T15:53:27Z
Hi

I've several tasks in one job
Each task sends its own mail!
I would recovery each text of each error message in order to create only one mail at the last step.

How could I keep them in a variable or txt file or other... to recovery them when sending the last mail please?

Any idea?
Sponsor
Forum information
Support
2018-02-13T09:05:21Z
You should use Notification on Job level instead. Check the video tutorial for Variables. To get the last running Task values you can use:

{TASK(PrevTask|StdOut)}

Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Guest
2018-02-13T09:10:47Z
Originally Posted by: Support 

You should use Notification on Job level instead. Check the video tutorial for Variables. To get the last running Task values you can use:

{TASK(PrevTask|StdOut)}




OK thank you
I will try that today and return here then.
Guest
2018-02-14T10:31:58Z
Hi

I don't find any example to solve my request.

I would like to create a mail with using a variable as content.
This content will be created by each task of the same job:
Each task will add one text and the end of its process to this variable.
" tak name" + "OK/NOK", depending on the flow.

After the end of the last task, I want to use the variable to create the content of mail.
then I'll send the mail.

How create the content like that please ?
thomas
2018-02-14T15:03:56Z
I would do it like this

1) Create a separate job that sends an email (Job A). I like to have generic jobs for these things. It could have job variables as subject, body, recipients.
2) In the job where you want to send the email (Job 😎, create a job variable that is updated after each task. Use the 'Set job variable' for this.
3) At the end of the job B, add a task of type Job/Task control (under internal). Call job A and pass in the relevant variables.
Guest
2018-02-15T11:04:17Z
Hi

how could I do that please?
"...that is updated after each task"
This my first problem.
Luc
thomas
2018-02-15T11:59:58Z
Unfortunately the only way I can see how to do this, is by adding a Set Variable task after each task. This means you get twice as many tasks as you would normally have. So add you regular task, and next add a Set Job variable task. In this task you update the variable with the new value (ie the old value + a new string)
Guest
2018-02-15T13:09:01Z
Ok
And to do that I use the task option : "Environment - Set variable" ?
or another one ?

This task don't allow me the variable previously created in the job button "Job Variables" in "Main Settings" tab.
In the case I creat a new variable here, this one doesn't appear in other tasks, is it?
thomas
2018-02-15T13:18:10Z
Use the set job variable task under 'Internal'. You have access to job variables there
Guest
2018-02-15T14:46:29Z
To update body in the Sending email job,
must I push the budy varible from the first task to this sending email job or is it pull process In sending email Job ?

How could I recover body text from another job in Sending Mail Job?
thomas
2018-02-16T13:53:46Z
You pass in variables, so that would be a push
wam
2018-02-20T23:24:31Z
Originally Posted by: Support 

You should use Notification on Job level instead. Check the video tutorial for Variables. To get the last running Task values you can use:

{TASK(PrevTask|StdOut)}



Support,

This doesn't work correctly. There is a race condition between the PrevTask and the last failed task when the Flow is set to "On Error: Continue with next Task (in order)". This will randomly output the StdOut of some Task on the associated Job, but which one is entirely timing dependent and not useful. I believe I have also seen it produce the wrong result even when the action is "On Error: Stop Job" and the Job is scheduled to start every minute and it failed after 59 seconds.

wam
2018-02-21T13:32:32Z
Originally Posted by: thomas 

Use the set job variable task under 'Internal'. You have access to job variables there



Thanks, thomas! This appears to be a valid workaround for the race condition in general job notifications. Not sure we're going to do this, given that it requires a Set Job Variable Task after every regular Task, but it does seem to work!
Scroll to Top