I need to run a command that requires sudo to run and I want to run it in crontab -e the command is sudo java -jar WurmMapGen.jar but it asks for a password. I want this to be an automatic unattended type thing where it runs at 2 am every morning. How do I use sudo but get it where it doesnt ask for a password?
Asked
Active
Viewed 25 times
crontab
. So, as the root user, typecrontab -e
instead. Then you will end up adding to sudo'scrontab
and not your's. – Ray Aug 10 '22 at 16:07