Need a Filewatcher job to fail and an alert sent if the file is not found in certain amount of time
search cancel

Need a Filewatcher job to fail and an alert sent if the file is not found in certain amount of time

book

Article ID: 433958

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

We need a file watcher job to send an email alert if the file doesn't show up within a certain amount of time (say 30 minutes), and the job needs to fail if the fie is not found within the alotted time. Below is a JIL definition of the jobs current setup

insert_job: TST_FW_ALERT_FAIL_JOB   job_type: FW 
machine: localhost
owner: autosys
permission: 
date_conditions: 1
days_of_week: all
start_times: "13:00"
description: "filewatcher for test"
min_run_alarm: 1
max_run_alarm: 30
alarm_if_fail: 1
alarm_if_terminated: 1
send_notification: F
notification_template: "emailtest"
must_start_times: "13:01"
watch_file: "/tmp/*TESTING*.csv"
watch_interval: 5
notification_emailaddress: email_address1
notification_emailaddress: email_address2
notification_alarm_types: JOBFAILURE
notification_alarm_types: MAXRUNALARM
notification_alarm_types: MINRUNALARM
notification_alarm_types: MUST_COMPLETE_ALARM
notification_alarm_types: MUST_START_ALARM

Resolution

Add the term_run_time attribute to the job.

insert_job: TST_FW_ALERT_FAIL_JOB   job_type: FW 
machine: localhost
owner: autosys
permission: 
date_conditions: 1
days_of_week: all
start_times: "13:00"
description: "filewatcher for test"
min_run_alarm: 1
max_run_alarm: 30
alarm_if_fail: 1
alarm_if_terminated: 1
send_notification: F
notification_template: "emailtest"
must_start_times: "13:01"
watch_file: "/tmp/*TESTING*.csv"
watch_interval: 5
term_run_time: 30
notification_emailaddress: email_address1
notification_emailaddress: email_address2
notification_alarm_types: JOBFAILURE
notification_alarm_types: MAXRUNALARM
notification_alarm_types: MINRUNALARM
notification_alarm_types: MUST_COMPLETE_ALARM
notification_alarm_types: MUST_START_ALARM