sudo crontab -u root -e
Which way is preferred? As they all run tasks within administration privilege.
The format of
Notice in a per user crontab there is no 'user' field.
An aspect of crontabs that may be confusing is that root also has its own crontab. e.g.
In Linux distros, per user crontabs are typically stored in:
/etc/cron.d (and its brothers cron.daily/weekly/monthly) is preferred for all system crontabs. You shouldn't need to touch /etc/crontab.
It's essential to separate cron entries in multiple files, based on their functionality if you are planing to manage or automate things. Files under /etc/cron.d can be easily managed by packages or configuration management tools like puppet and chef. Root's crontab OTOH is practically un-maintenable by anything other than humans.
So in short, for system stuff you can use /etc/cron.*. If there's something you would like the root user to do then use root's crontab. /etc/crontab should be left untouched and managed by a package.