Which user does a cron job run as?
If I set up a cron job using my user ('crontab -e'), who does it actually run as? Does it run as my user, or as some sort of cron user? My problem is that I have cron run a script for me. It doesn't seem to work when cron does it, but if I execute it directly, then it works fine. Thanks for the help.
Whatever user created the cronjob.
Your problem with the script is likely due to the different nature of the way cron works.
You need to set a PATH for yourself, for instance, and make no assumptions about the current working directory.
Your problem with the script is likely due to the different nature of the way cron works.
You need to set a PATH for yourself, for instance, and make no assumptions about the current working directory.
Ah, you beat me to it.
yea whatever user creates the cron that is who it runs under
yea whatever user creates the cron that is who it runs under
"crontab -e" will create a cron tab file for the user who executed the crontab command (In your case, you). If you need root access run "crontab -e" as superuser.
Maybe list your crontab and script here if you're still having problems.
Maybe list your crontab and script here if you're still having problems.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement