Run Crontab As A Certain User

Crontab is great when you want to run a program or a script at certain times of the day, week or month. You just schedule crontab, and it will run for you automatically, almost all the time, without a hitch. Crontabs are great if you have certain requirements that you want to run at specific times of the day. Now, each system user has their own individual crontab.

To run Crontab as a yourself, you simply type in the Terminal.

crontab -e

The crontab format is typically: * * * * *  /var/www/

But, I’m not going to go into details about crontab in this post.

If you need to run Crontab as another user, simply use the -u switch.

crontab -u username -e

If a user doesn’t have permission to run crontab, you may need to run it as sudo.

sudo crontab -u username -e


I’ve learned something new today, Sudo. Sudo is a Unix command that allows system administrators to give certain users the ability to run some or all commands as root. Why? Well, I have this program called Bluefish which I use as a HTML editor. I have to run Bluefish as root to modify my webroot directory. I could have ran Bluefish as a regular user, but I didn’t want to use my home directory to shuttle back and forth the modified web pages.

Continue reading