cancel/pause scheduled job

215 views
Skip to first unread message

joepho...@gmail.com

unread,
Apr 18, 2014, 2:02:32 PM4/18/14
to azkab...@googlegroups.com
Hi all,

I am wondering if we can cancel or pause a schedule when something is break.

For example, I have a job scheduled to read files on hard drive every second. It will send me email when it fails. Now, if the hard drive fails in middle night, next morning I will receive many emails because Azkaban will run it again and again. If we can let job to cancel schedule on error, this will look better. My email box will look better at least. I am wonder how you solve this issue internally? Do I need to handle this in my job code??

Thanks,
Feng

Anthony Hsu

unread,
Apr 18, 2014, 2:54:36 PM4/18/14
to azkab...@googlegroups.com
Hi Feng,

Unfortunately, Azkaban currently does not support automatic unscheduling upon a failed execution.  You would either have to manually unschedule your flow, or handle errors in your code so that your flow doesn't fail (though if there are errors, you probably want your flow to fail so that you get an email alert).

Best,
Anthony


--
You received this message because you are subscribed to the Google Groups "azkaban" group.
To unsubscribe from this group and stop receiving emails from it, send an email to azkaban-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Felix GV

unread,
Apr 18, 2014, 2:58:25 PM4/18/14
to azkab...@googlegroups.com
If you have a reliable way of tracking state between job runs (on disk, in ZK, in a database or otherwise...), you could maintain some sort of flag for the last time en alert email was sent for that specific job. Then, your job can choose to fail or not based on that with a threshold of your choice. For example, you could choose to make the job fail only if one hour has passed since the last failure. This way, you throttle down your email alerts to once per hour, instead of once per second.

--
Felix
Reply all
Reply to author
Forward
0 new messages