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


timorridge
2010-06-10T17:19:59Z
🤬 Hi all,

We have recently started using Visual Cron and I have a couple of questions regarding logs?

a) Does Visual Cron log detailed results of a job process, an example would be;

** TEST JOB STARTED
file xxxxx.dat transmitted 12:01pm 01/01/01
file yyyyy.dat transmitted 12:02pm 01/01/01
** TEST JOB FINISHED

I think you can see what I need. I just dont want to know if a job started and finished on a date/time but actually what was transmitted during that job>

b) Can you get a notification out of Visual Cron which alerts you if NO file existed in a location. Say if we always sent a file but one day no file was created could we get a notification alerting us of a non existent file?

If any of you could help me with this that would be great.

Many thanks,

Tim.
Sponsor
Forum information
ErikC
2010-06-11T08:28:03Z
Hi timorridge,

I will try to answer your questions:

a)
You can use notifications for this.
The way I do this is adding a notification to every task (notify on complete).
In this way you have a log file for every job and you can see all the steps in there.
This is my notification:

File Notification
Append to file: checked
Filename: f:\pathtoyourlogs\{JOB(Active,Name)}-{DATEFORMAT(yyyyMMdd)}.txt

Message/Body
{TASK(Active,Name)}
Result: {TASK(Active,Result)}
Last run: {TASK(Active,LastRun,M/d/yyyy h:mm:ss.ff tt)}
Last exited: {TASK(Active,LastExited,M/d/yyyy h:mm:ss.ff tt)}
Execution time: {TASK(Active,ExecutionTime)} seconds
===
Output:
{TASK(Active,StdOut)}
===
Error output:
{TASK(Active,StdErr)}
=======================================

b)
You can setup a condition to a send email task that emails if there is no file present. This task is an email task telling you there is no file, and the condition bound to this task is setup to continue the task if there is no file found. This way the task will only mail if there is no file present.

You can change the 🤬 to a 😁 I hope.

Regards
Erik
Uses Visualcron since 2006.
timorridge
2010-06-11T11:26:13Z
Hi, sorry I'm really new to VC, how do I express this in the file notification as a test? Assuming my job is called "test job" where would this go in the script?

Thanks for your reply

File Notification
Append to file: checked
Filename: f:\pathtoyourlogs\{JOB(Active,Name)}-{DATEFORMAT(yyyyMMdd)}.txt

Message/Body
{TASK(Active,Name)}
Result: {TASK(Active,Result)}
Last run: {TASK(Active,LastRun,M/d/yyyy h:mm:ss.ff tt)}
Last exited: {TASK(Active,LastExited,M/d/yyyy h:mm:ss.ff tt)}
Execution time: {TASK(Active,ExecutionTime)} seconds
===
Output:
{TASK(Active,StdOut)}
===
Error output:
{TASK(Active,StdErr)}
ErikC
2010-06-11T11:50:03Z
hmm a newbie.. no worries 😎

On the main ribbon, there is a Notification button. Setup a new notification as I mentioned before.
If you open up your task, the last tab is the notification tab. Check your just made notification in the 'notify on complete' column. (middle)

That's it.

Regards
Erik
Uses Visualcron since 2006.
viper8
2010-06-18T20:17:52Z
ErikC wrote:

Hi timorridge,

I will try to answer your questions:

b)
You can setup a condition to a send email task that emails if there is no file present. This task is an email task telling you there is no file, and the condition bound to this task is setup to continue the task if there is no file found. This way the task will only mail if there is no file present.

You can change the 🤬 to a 😁 I hope.

Regards
Erik



Erik, I've been attempting something like you stated in option b) above, and haven't quite gotten it right.

Here is what I have so far:

Job called "Email Alert". Email Task called "Email alert that file is missing". The actual text in the email task is: "Alert! The {TASK(Active|Name)} is missing a file!"

Condition Set: Checks for a file C:\test.txt, if not true then it runs the task above. I'm aiming for portability here since I have many jobs on the server.

So, I add that condition to task, and the problem I'm having is that every time c:\test.txt is missing, the body of the email returns the name of the email task, NOT the task that actually has the file missing. Any way to get around that?

Or is there a better method in detecting missing files and alerting on that? What I really need is an alerting system for when I attempt to pull a file from an FTP, and the file isn't there.

Thanks!

Scroll to Top