in reply to Automating sudo actions

rastoboy:

If you're going to schedule the task, you can avoid sudo altogether (at least for running the task) by putting it on the roots crontab. Then you'll only need sudo for editing the crontab.

...roboticus

When your only tool is a hammer, all problems look like your thumb.