• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved scheduled task can't choose webspace user

Fixel

New Pleskian
Hi all,

I tried to setup a php cron via plesk. All fine, but it needs to run with the same user as php. For me thats my webspace user.

The problem is the user is not listed where all other users are listed.

Is this a Bug? How can I choose my webspace user for cron?

Thank you in advance,

Fixel
 
When you are logged in with the web space user, you cannot choose any other user for cron script execution but your own (in fact, you cannot choose a user at all, it is automatically chosen). When you are logged in as administrator, you can choose any system user, but not a web space user. That is by design. So if you want to run a script by the web space user, log in as the web space user first. For example, from a system admin login you can list the subscriptions and click on "Manage in Customer Panel" to configure the job from the user's perspective.
 
Thank you for the quick answer!

Unfortunately, I did not quite understand how to change to the webspache user. Would you be so kind and describe the exact process again?

Thanks!
 
In the main menu click on "Subscriptions" to display a list of all subscriptions. In the rightmost column of that list find the Link "Manage in Customer Panel".
 
It is missing the "subscriptions" because it is not the "web host edition" of Plesk. When all websites and domains are managed by yourself, there is no need to have different users to run a cron job, because the only person who operates the websites has administrator privileges anyway. So in this case I think it is safe to run the job as root.
 
I solved my Problem by adding the Cron Job manually:

Code:
crontab -u <MyUser> -e

After that, refreshed the cron Site inside Plesk.
 
Back
Top