how to run a job as a different user from crontab
How do i run a script(say abc.pl) in cronjob with some other user id.
Say, I am admin of a server and i want to run a script abc.pl as user X through cron job at the some particular time of day. How do i do it using cronjob that runs with my id. Any suggestions? |
Hello,
You can su - to the user or edit the user's crontab directly if you're root: Code:
crontab -u <user> -e Kind regards, Eric |
or use
Code:
15 * * * * username /usr/bin/somecommand |
All times are GMT -5. The time now is 06:26 AM. |