eZ Community » Forums » General » runcronjobs.php and linux exit status
expandshrink

runcronjobs.php and linux exit status

runcronjobs.php and linux exit status

Monday 18 November 2013 12:59:38 pm - 2 replies

wouldn't it be better if runcronjobs.php could output a correct exit status (I mean, different than 0) in case of an error?

we've plenty of cronjobs and instead of the usual linux cron:

 0 0 * * * cd $EZPUBLISH && $PHPCLI runcronjobs.php -q -s example 2>&1

we would prefer

 0 0 * * * cd $EZPUBLISH && $PHPCLI runcronjobs.php -q -s example > /dev/null

and receive emails only in case of errors (exit code different then 0)

I guess you'll tell me that we should stick to the "-q" way keeping all standard output and error messages into one stream (that should be empty in case no errors occurs), but I'm asking this from a sys-admin point of view: too often developers are apparently unable to easily make their scripts respect the "-q" options.
Suggestions?

Modified on Monday 18 November 2013 10:49:22 pm by Francesco Ronzon

Monday 18 November 2013 7:33:02 pm

Agree!

Pull requests welcome happy.gif Emoticon

Thursday 21 November 2013 3:00:42 pm

Quote from Gaetano Giunta :

Agree!

Pull requests welcome happy.gif Emoticon

should I do it? how? (never did it before)

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from