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.
The crontab format is typically: * * * * * /var/www/yourscript.sh
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