stdin: is not a tty

1,282 views
Skip to first unread message

octimizer

unread,
Nov 19, 2010, 2:29:31 PM11/19/10
to Whenever Gem
Hi everbody,

I've set up Whenever with Capistrano, deploying on my Ubuntu server.
Deploy goes well, I can see the crontab alright, but the rake task
doesn't get executed and I get an email from the Cron Daemon stating
simply:

stdin: is not a tty

I've made sure already that the rake task doesn't try to output
anything, plus the crontab shows the rake task should be run in silent
mode:
crontab -l output is:

* * * * * /bin/bash -l -c 'cd /path/to/my/app && RAILS_ENV=production
rake my:task --silent'



Any ideas ?
Many thanks !

Francesc

unread,
Dec 3, 2010, 5:29:03 AM12/3/10
to Whenever Gem
Same problem here. Did you find a solution?

Javan Makhmali

unread,
Dec 3, 2010, 9:03:51 AM12/3/10
to whenev...@googlegroups.com
I did some quick googling and landed on this comment:

http://www.webhostingtalk.com/showpost.php?s=49248523af28d0483ccd3f30da4f0384&p=6681903&postcount=7
"You have some kind of stty command in your .login or .cshrc or other startup file that is being executed by the non-interactive shell and causing that error."

Maybe check your .profile, .bash_profile, etc. for possible causes.

If all else fails you might using a different (or no) job_template with whenever.

From the README:

All jobs are by default run with bash -l -c 'command...'. Among other things, this allows your cron jobs to play nice with RVM by loading the entire environment instead of cron's somewhat limited environment. Read more: http://blog.scoutapp.com/articles/2010/09/07/rvm-and-cron-in-production

You can change this by setting your own :job_template.

set :job_template, "bash -l -c ':job'"

Or set the job_template to nil to have your jobs execute normally.

set :job_template, nil

On Dec 3, 2010, at 5:29 AM, Francesc wrote:

> Same problem here. Did you find a solution?
>

> --
> You received this message because you are subscribed to the Google
> Groups "Whenever Gem" group and because you're awesome.
> To post to this group, send email to whenev...@googlegroups.com
> To unsubscribe from this group, send email to
> whenever-gem...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/whenever-gem?hl=en

Francesc

unread,
Dec 6, 2010, 7:11:17 AM12/6/10
to Whenever Gem
Setting job_template to nil seems to do the job.

Thanks!

octimizer

unread,
Dec 17, 2010, 7:20:00 AM12/17/10
to Whenever Gem
nice,

found that comment myself too, but couldn't make much sense of it.
thanks for the explanation Javan !

problem solved.
Reply all
Reply to author
Forward
0 new messages