• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

A Guide to setting up Scheduled Tasks

ThePromenader

New Pleskian
Hello,

I've just spent the afternoon fighting to get Plesk executing Scheduled Tasks. I read a lot of 'bits' of different info on how this could be done (for many different installations), but I couldn't find a unique comprehensive guide that covers everything for all Linux distributions.

First off, you're going to have to activate /bin/bash ssh access through Domains -> Manage Hosting (of the domain you want to configure) -> Websites & Domains (more) -> Web Hosting Access. There you're going to go to the 'Access to the server over SSH' dropdown menu and choose '/bin/bash' (which is usually the default Linux shell, btw) to keep Plesk from chrooting you (which it insists on doing in a way all the same, more later).

Secondly, now that you have SSH access, log in through either the Plesk Terminal window (accessible through previous Websites & Domains page, but in "Advanced Options") or your own (accessing with the domain administrator login/password), and enter:

Code:
# /usr/local/psa/bin/server_pref -u -crontab-secure-shell "/bin/bash"

...this will ensure even further that scripts run through the Plesk environment with a '/bin/bash' shell.

Next, and this is important, go to your terminal and get your $HOME directory (
Code:
echo $HOME
) - just to be sure, because this may change depending on your Linux distro. Keep the path it returns in mind: all calls within your scripts, and the script itself, should be above (within) that 'root' folder - Plesk for some reason refuses anything else. Also, your script calls/location should be like: 'httpdocs/scripts/myscript.sh' if your $HOME is the 'mother' folder of 'httpdocs' - putting the entire path to the script, or putting the entire path in a call to any external files within your scripts, won't work either.

I hope this helps someone, cheers.
 
Last edited:
Back
Top