|
Home > Archive > Unix Programming > January 2004 > Error handling in korn shell scripting
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Error handling in korn shell scripting
|
|
| Ryan Gaffuri 2004-01-23, 5:14 pm |
| 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.
| |
| Mark Rafn 2004-01-23, 5:14 pm |
| Ryan Gaffuri <rgaffuri@cox.net> wrote:quote:
>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.
quote:
>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.
quote:
>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/>
|
|
|
|
|