Scheduled tasks (or "cronjobs") are useful for executing scripts on your server at various intervals of time. They're fairly easy to setup in Plesk 11, which comes with Media Temple's Dedicated Virtual (DV) 4.0 systems. However, if you're using something like
curl in your task, it may not appear to work.
Your first thought will probably be, "why isn't my cronjob running?" So you check the settings and they all look good. You verify the command letter-by-letter, and even paste the URL into a browser to make sure it's right. And it is. What the...?
Actually, your cronjob probably is running as expected. The problem is that the FTP user doesn't have permission to run bash commands. Luckily, that's easy to fix.
- Login to Plesk
- Select Domains
- In the section with your domain, select Manage Hosting
- Under Websites & Domains > More, select Web Hosting Access
- Change the Access to the Server over SSH dropdown to
/bin/bash, as shown here:
That's it, hit OK and your cronjobs will start running as expected. Just keep in mind that this assumes you're using the Service Provider view in Plesk. You'll have to dig around if you're using another view, but the option shouldn't be too hard to find.