Partner with experts to accelerate your digital transformation journey
Bobcares

Running a Cron job via Scheduled Tasks in Plesk fails | Fixed

PDF Header PDF Footer

Running a Cron job via Scheduled Tasks in Plesk fails is no longer a problem with Bobcares by your side. 

At Bobcares, we offer solutions for every query, big and small, as a part of our Server Management Services.

Let’s take a look at how our Support Team is ready to help customers run a Cron job via Scheduled Tasks in Plesk.

Why Running a Cron job via Scheduled Tasks in Plesk fails

Some of our customers have been facing a bit of trouble while attempting to execute a task on schedule that runs a command to execute a script in Plesk. It often results in one of the following error messages:

Task ” php -q /var/www/vhosts/example.com/httpdocs/wp-cron.php” completed with error in 0 seconds, output:

-: /dev/null: Permission denied

Or,

Task ” php -q /var/www/vhosts/example.com/httpdocs/wp-cron.php” completed with error in 0 seconds, output:
-: php: command not found

After careful analysis, our Support Team has come to the conclusion that a missing command in the chroot environment or a lack of permission on the script file is the cause behind the error. Fortunately, our proficient Support Techs have come up with a solution to resolve the issue:

  1. First, log in to Plesk.
  2. Then, head to Subscriptions > example.com > Web Hosting Settings > Access to the server over SSH. and modify the shell for the subscription to /bin/bash.

    Before we move on to the next step, our Support Team would like to point out that is not necessary if the executable file is not accessible via the Plesk File Manager.

  3. Next, we modify the permissions or task type.
    • For shell scripts:

      Navigate to the problematic file under Domains > example.com > File Manager and add the following executable permissions:

      Running a Cron job via Scheduled Tasks in Plesk fails

    • For the .php scripts:

      Head to Domains > example.com > Scheduled Tasks > Add Task and recreate the task as Run a PHP script:

      Running a Cron job via Scheduled Tasks in Plesk fails

[Looking for a solution to another query? We are just a click away.]

Conclusion

To sum up, our skilled Support Engineers at Bobcares demonstrated running a Cron job via Scheduled Tasks in Plesk fails

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Get featured on the Bobcares blog and share your expertise with a global tech audience.

WRITE FOR US
server management

Spend time on your business, not on your servers.

TALK TO US

Or click here to learn more.

GET UP TO 25% OFF

Plesk Support

Spend time on your business, not on your servers.

Managing a server is time consuming. Whether you are an expert or a newbie, that is time you could use to focus on your product or service. Leave your server management & end-user tech support to us, and use that time to focus on the growth and success of your business.

TALK TO USOr click here to learn more.

Speed issues driving customers away?
We’ve got your back!