Take the 2-minute tour ×     sudo rm somefile share|improve this
question Welcome Sayem Siam, Have a look at the answers to this
question askubuntu.com/questions/2368/how-do-i-setup-cron-job.
as I think your question has been asked before here on AU – 
heisenberg Aug 9 '12 at 17:56 I am trying to execute sudo which
needs password but how can i giv password from cron file – 
sayem siam Aug 9 '12 at 17:59 @sayemsiam you don't need to put
sudo, just edit the root crontab. –  Braiam Dec 6 '13 at 12:21
add comment  3 Answers  up vote 37 down vote accepted  I won't
get into how much this is a bad idea; simply put, running sudoin
crontab requires your password to be stored somewhere in
plaintext.  It's a bad idea.   Use root's crontab  Run the
following command:  sudo crontab -e  This opens up root's
crontab. sudo is not necessary to run your command in this
context, since it'll be invoked as root anyway.  Therefore, you
would simply append the following to root's crontab.  @hourly rm
somefile   Again, this is not r