This is the mail archive of the
mailing list for the Cygwin project.
Re: Problem with cron jobs
- From: Andrew DeFaria <Andrew at DeFaria dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 21 Aug 2014 14:40:38 -0700
- Subject: Re: Problem with cron jobs
- Authentication-results: sourceware.org; auth=none
- References: <CAEF1h+VvERQqWKnorMSFRF=NPhbMU+OTO437VkmJK7eY-buvgQ at mail dot gmail dot com> <1041974061 dot 20140821182500 at yandex dot ru>
On 8/21/2014 7:25 AM, Andrey Repin wrote:
Greetings, Cary Lewis!
I have created a small shell script that acts like a network
connectivity watchdog, which checks for a successful ping to the
internet, and if it doesn't work, restarts the machine.
When I attempt to run it from a cron job, the script exits whenever
any of the commands exits with a non zero status, preventing the
script from doing its job.
Has anyone seen this behaviour before?
I have tried wrapping the script in () to run it within a sub-shell,
but to no avail.
You have to disable abort-on-error in your script.
Andrey Repin (email@example.com) 21.08.2014, <18:24>
Sorry for my terrible english...
$ man bash | grep abort
Control-G will abort an incremental search and restore the
It might be better if your searched for "errexit".
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple