Error handling in korn shell scripting

  • Follow


We do alot of cronjobs. If we have syntax errors in our cronjobs we
currently have no way of knowing this. Since unix doesnt compile in
advance, is there any known method to handle this?

yes I know you need to test first, but its good to be prepared.
0
Reply rgaffuri (218) 11/25/2003 6:21:01 PM

Ryan Gaffuri <rgaffuri@cox.net> wrote:
>We do alot of cronjobs. If we have syntax errors in our cronjobs we
>currently have no way of knowing this.

Huh?  I'd think you'd get e-mail with the failure.  Even lacking this, you can
check the logs for cron, or any that your job creates to see how it went.

>Since unix doesnt compile in
>advance, is there any known method to handle this?

Shell scripts aren't compiled in advance.  You can easily have cron run
programs you compile if you think this is a problem.  I'd expect this won't
save you much work, though.

>yes I know you need to test first, but its good to be prepared.

Be prepared by testing first, and by making sure your logs and notifications
are such that you can detect and recover from errors.  This includes both
errors in logic and in syntax.
--
Mark Rafn    dagon@dagon.net    <http://www.dagon.net/>  
0
Reply dagon 11/25/2003 7:25:02 PM


1 Replies
911 Views

(page loaded in 0.041 seconds)

Similiar Articles:













7/24/2012 8:48:03 AM


Reply: