Variable Tasks In An Email Body - VisualCron - Forum

Community forum

Nautius
2013-11-19T15:01:48Z
I am trying to come up with a way to look at the tasks involved in a job and report on those in the body. As there are varying tasks in each job, the tasks would have to rely on some coding to appear/not appear. Here's my template that I'd like to use. I am not sure what to write this in to achieve the desired results.

Any suggestions would be helpful.

My Example -


Subject: The {JOB(Active|Name)} completed with the following status {JOB(Active|Result)}.

Body:

Job: {JOB(Active|Name)}

Completion Time: {JOB(Active|Name)}

Tasks:

(Please take in mind this is MY logic as an example... not any particular language)

If TaskOrder = 1 Then

Task: {taskorder(<1>|name)} Result: {taskorder(<1>|result)}

Else (not visible)

If TaskOrder = 2 Then

Task: {taskorder(<2>|name)} Result: {taskorder(<2>|result)}

Else (not visible)

If TaskOrder = 3 Then

Task: {taskorder(<3>|name)} Result: {taskorder(<3>|result)}

Else (not visible)



ETC....
Support
2013-11-19T15:18:07Z
This is only possible through the API right now. There is no way right now to loop through Tasks or getting Task info without going straight against the Task Id or the PrevTask.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Nautius
2013-11-19T16:12:20Z
Can I simply connect to the .sdf file with SQL Server Management Studio and import it to a database?

From there, I can set up triggers based on job date/time to send notifications.


So, I guess the next question is, what credentials do I need to set up a connection? And is it supported by VisualCron?
Support
2013-11-19T16:58:08Z
Originally Posted by: Nautius 

Can I simply connect to the .sdf file with SQL Server Management Studio and import it to a database?

From there, I can set up triggers based on job date/time to send notifications.


So, I guess the next question is, what credentials do I need to set up a connection? And is it supported by VisualCron?



The .sdf files only contain logs. If you want to extract information in realtime you should focus on the API. There is a sample project in the API folder. We also offer custom development.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Nautius
2013-11-19T17:31:49Z
Originally Posted by: Support 

Originally Posted by: Nautius 

Can I simply connect to the .sdf file with SQL Server Management Studio and import it to a database?

From there, I can set up triggers based on job date/time to send notifications.


So, I guess the next question is, what credentials do I need to set up a connection? And is it supported by VisualCron?



The .sdf files only contain logs. If you want to extract information in realtime you should focus on the API. There is a sample project in the API folder. We also offer custom development.



Thanks, but I think I'll either do the API or try to figure a way to write all the objects and logs to a SQL database.

I was hoping there was another user out there that may have a similar situation.

We have so many jobs and tasks, that trying to write a notification process for every single one is not the way to go. Especially if we want to show task results. We are trying to show to our organization that VC is an enterprise level application. And one of the key components to that is error alerting and notifications.

Speaking as the administrator, I don't want to me spammed with every failed job. Therefor, I am going to create a task that can find all the errors that occurred within a given time frame. 24 hours, for example, or the previous night's jobs and then send it to me in a report. I can easily set up one job to be called at the end of each job, but I am limited to only the job results and NOT the task results. The limitations being that the only variables available at the task level are current task, previous task and last task.

We have several jobs set up that take inbound files and send them to different locations (in and out of the network) that are built around the nature of the process or the vendor. The tasks are set up to continue if one of the previous tasks fail so the subsequent tasks will continue sending the files to their respective locations.

This is where the necessity to capture and report on the task events is critical. And that is the impetus behind the structure of the email format I have above.


So, I am trying to develop a robust notification process that is not dependent on the jobs or tasks. As well as a error log report that shows detail.

So, there's the whole story. Any ideas?



Scroll to Top