When I execute shell, but it is carried out by cron
"sudo: sorry, you must have a tty to run sudo"
appears.
but how should this have dealt?
Cron – the error occured a command in sudo from crontab
cronsudo
cronsudo
When I execute shell, but it is carried out by cron
"sudo: sorry, you must have a tty to run sudo"
appears.
but how should this have dealt?
Best Answer
You don't need sudo to run programs as other users in cron (at least with the system crontab).
Just change the user field from root to the target user.
If you really want su does work in cron.