2011/06/16: running programs (like mutt) from cron

When logged in normally you have a tty associated with the session. When logging in with ssh, you can use the options -t and -T whether you want a pseudo-tty to be allocated with your session. For programs started from your crontab, no (pseudo) tty is allocated.

So far, so good. However, some programs (like mutt) behave differently depending on whether a tty is allocated. In some cases, this is not desirable. In these cases, a good way to get a ptty is to start the process in a screen.


screen -S myscreename -d -m mycommand



Cross-referenced by: