From: Todd Lyons Date: Wed, 13 Nov 2013 03:34:11 +0000 (-0800) Subject: Address tty errors running from cron X-Git-Url: https://git.exim.org/buildfarm-client-wiki.git/commitdiff_plain/805a57a159dc9d354dfd6cad4a3fc13226b9d536?hp=c1fd079c730e0875933934ab7efbee862b064f00 Address tty errors running from cron --- diff --git a/Installation.md b/Installation.md index 719399c..1c910ce 100644 --- a/Installation.md +++ b/Installation.md @@ -38,6 +38,10 @@ export PATH="/usr/local/bin:/sbin:/usr/sbin:$PATH" $HOME/code/run_cron.sh --run-all $@ Then I make my cronjob call: `6 * * * * $HOME/bin/build_farm.sh` +20. My cronjob ran great for a couple weeks. Then another problem popped up running the cron job in that the test portion suddenly started failing with an odd error: +
** runtest error: Failed to open /dev/tty: No such device or address
+This is not a sudo issue, this is because the cron daemon does not give a tty to the cronjob that it starts. To fix this, I used an old ssh trick to start my *build_farm.sh* script: +
6 * * * * ssh -tt farm@localhost $HOME/bin/build_farm.sh
## Multiple build clients on one machine As mentioned above, you can start at step 9. A second application must be filled out to put the appropriate data in the database because this is treated a separate BuildFarm client: