Sunday 15 February 2015

cron - How do handle Java runtime errors when running as a cronjob -



cron - How do handle Java runtime errors when running as a cronjob -

i running java standalone jobs cronjobs. noticed in rare instances job fail runtime exception such outofmemoryerror. cron's mail_to handler not seem pick failure of job , java application incapable anything, execution stopped due memory error.

what best practice handle such errors , have cron alert? closest think of each java job writes "success"-log record , chain grep in cronjob , homecoming error code cron's mail_to pick up. clutter crontabs , requires code changes write log entry.

why don't utilize seek grab block grab out of memory exception , necessary thing in grab block.. u create failure log records , add together job in log when u reach grab block

java cron

No comments:

Post a Comment