Answers for "run cron job as specific user"

0

run cron job as specific user

# Crontab Running as a Specific User
# From root's crontab sudo crontab -e, you can use:
1 1 * * * su username -c "/path/to/your/script.sh"
Posted by: Guest on September-15-2020
0

run cron job as specific user

# Crontab Running as a Specifi User
# Through Command Line, you use the User's Actual crontab like this:
sudo crontab -u username -e
Posted by: Guest on September-15-2020
0

run cron job as specific user

# Crontab Running as a Specific User
# Only /etc/crontab and the files in /etc/cron.d/ have a username field. In that file you can do this:
1 1 * * * username /path/to/your/script.sh
Posted by: Guest on September-15-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language