How to run a cron job as a specific user?
Problem
I would like to run a cron job as a specific user on my machine. How may I specify the user for a cron job to run as?. The cron jobs will be running on a server (running on Ubuntu 10.0.4). The 'users' are users that have been created specifically for carrying out specific server side tasks. These 'users' have the following in common: Cannot log onto the system Have restricted access to specific folders/files
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Fix for: How to run a cron job as a specific user?
Assuming you can't just log in and add it to that user's crontab, put a file in . It should be formatted as a normal cronjob, but with an extra field. Before the command to run and after the timing, put the user. You should be able to find examples already on your system. Example:
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix