Quantcast
Channel: Cron jobs monitoring using exit code - Unix & Linux Stack Exchange
Browsing latest articles
Browse All 3 View Live

Answer by Gerard H. Pille for Cron jobs monitoring using exit code

You can pass the exit code as a parameter to your script: ls -l /tmp/filethatdoesnotex.ist /usr/local/bin/test.sh $? with test.sh: RESULT=$1 if [ $RESULT -gt 0 ] then echo "something bad happened and...

View Article



Answer by wurtel for Cron jobs monitoring using exit code

The exit status of a command is not something that is stored globally in the system; it is kept locally by the shell that executed the command. As soon as the shell executes another command, the...

View Article

Cron jobs monitoring using exit code

I want to monitoring cron jobs using shell script. But if I use variable contain exit code of last command I have "0" always. I think it's because I run this script after cron job and "exit code"...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images