We don't need no stinkin' error notices!

Started by Melbosa, June 26, 2018, 01:58:24 PM

Previous topic - Next topic

What do you do when your Job Scheduler program, that understands your coding language for said job (Powershell, PHP, C#, etc), can't react when your code throws an exception that is normal to the language?

Contact your vendor, say what the hell man?
1 (33.3%)
Write your own notification module to handle the exception?
2 (66.7%)
Write better code that doesn't error?
1 (33.3%)
Check logs periodically for errors?
2 (66.7%)
Wait till someone complains?
2 (66.7%)

Total Members Voted: 3

Melbosa

Me personally, I'll just go with Option #5 :P

In reality I've asked my team member that looks after our product to figure it out or contact our vendor, but up to this point (and we have been using the Job Scheduler software for many years) we have either done #2 or #5.
Sometimes I Think Before I Type... Sometimes!

Lazybones

Since we basically just use Windows Task Scheduler and CRON on linux I am not sure I understand the question.


Melbosa

    Quote from: Lazybones on June 26, 2018, 02:00:48 PM
    Since we basically just use Windows Task Scheduler and CRON on linux I am not sure I understand the question.


    We use a product called Jams Scheduler (http://www.jamsscheduler.com) that allows you to centralize all your automation and scheduling of a magnitude of code bases.  It understands many languages and their syntax allowing you to work with various facets of your code for a lot of different reasons.  Basically its task scheduler or cron on steroids with the ability to proactively, re-actively, and sequentially work with code in lots of ways.

    So it knows say PowerShell, and when you create a job with PowerShell as it's code base, it wants to know what version, how to run, under what credentials, with what parameter or variables, whom to notify, what to do on success, failure, partial success, etc.  Problem is, when the PowerShell throws an exception, the way we currently use the product, it may be logged in a log file, but the system doesn't notify us of the exception and marks the execution as Successful.

    What I am asking is, in your place of work, in relation to your job scheduling, do you:

    • Call a vendor to help with execution and error handling of the job?
    • Write your own error handling and notification modules?
    • Fix the code so it doesn't ever error?
    • Review logs of automation regularly, but not from a notifications, just checking the logs?
    • Wait until someone complains that there is a problem?

    Reason I put the options for multiple choices, is that you may do #5, then #4, then #3, maybe #2 and not #1 as an example.  Its just a fun poll, not looking for a fix for how we are doing it here, just curious what everyone does at their respectable jobs.
    [/list][/list]
    Sometimes I Think Before I Type... Sometimes!

    Lazybones

    That makes sense, however I suspect that that tool MUST have an exit code detection option that flags failed tasks.

    For most SHELL / CMD scripts you actually need to set / pass an exit code and somewhat trap failures to send them. I would assume the same for PowerShell.. Also if you are calling other scripts or forking your processes immediately the initial task may show as complete immediately even if the forked process is still running.

    Melbosa

    Quote from: Lazybones on June 26, 2018, 03:41:40 PM
    That makes sense, however I suspect that that tool MUST have an exit code detection option that flags failed tasks.

    For most SHELL / CMD scripts you actually need to set / pass an exit code and somewhat trap failures to send them. I would assume the same for PowerShell.. Also if you are calling other scripts or forking your processes immediately the initial task may show as complete immediately even if the forked process is still running.
    You are probably right (is my suspicion as well), and am hoping that my IT guy can tell me what exactly that can be... and I can make sure my scripts/code executes properly.
    Sometimes I Think Before I Type... Sometimes!

    Lazybones


    Melbosa

    Quote from: Lazybones on June 26, 2018, 04:17:49 PM
    An example of a powershell script setup to trap and set the exit code

    https://dmitrysotnikov.wordpress.com/2008/05/29/monitor-web-site-availability/
    Yeah I know how to do it... its what the job app wants to see that matters.  I've done lots of PowerShell coding, I very advanced in it actually.
    Sometimes I Think Before I Type... Sometimes!

    Tom

    The tool really shouldn't be craping out on an exception of any kind. its supposed to run jobs that can and will fail... dumb?
    <Zapata Prime> I smell Stanley... And he smells good!!!

    Melbosa

    Tool does not crap out. It doesn't react to exceptions at the moment.
    Sometimes I Think Before I Type... Sometimes!

    Mr. Analog

    While its tempting to write around bad software the problem is if they fix it my "fix" usually breaks things
    By Grabthar's Hammer

    Tom

    Quote from: Melbosa on June 27, 2018, 08:03:42 AM
    Tool does not crap out. It doesn't react to exceptions at the moment.
    That sounds like craping out to me. if it doesn't notice failures, and tell you, its not doing its job.
    <Zapata Prime> I smell Stanley... And he smells good!!!