How To Set Job With Different User In Crontab?
I have some crontab jobs. I have setup them with root user. But there are some problems. The job do not work because of security issues that prevents job to run with root user. How can I set different user to run crontab job to run different user than current user?
Crontab is used install, deinstall or list tables of cron daemon. As we know each user have their own tables because of the security restriction. To use crontab the user shouldn’t be defined in /etc/cron.eny
Install New Job With Different User
We will install new job with different user by providing username with -u parameter. As we know to use different user we should have root privileges.
$ crontab -e -u ismail
Every night the backup command will run
List Jobs Of Different User
We have added new job for user ismail. We can list jobs of different user too like below.
$ crontab -l -u ismail