Resolving Unable to Activate Scheduled Task in Plesk

Resolving Unable to Activate Scheduled Task in Plesk

When working with Plesk, you may come across the issue of not being able to activate Schedule Tasks even after refresh. It mainly occurs when the subscription’s main domain is suspended.

In such cases, the below command is automatically executed which stops the execution of crontab commands of a particular user account:

Code:
/usr/local/psa/admin/sbin/crontabmng deny USERNAME
The above command adds the value ##!PSA!## to the crontab user file. Thus, it prevents the execution of the scheduled task. The file will look something like this:

Code:
grep PSA /var/spool/cron/USERNAME
##!PSA!## 0 2 * * * (((((/opt/plesk/php/7.4/bin/php -f 'example.com/bin/console' -- 'cache:clear') ) ) ) ) > /dev/null
There are two ways you can fix this error.

Solution 1

Here are the steps you need to follow:
  • Log in to your Plesk account
  • Navigate into Subscriptions or Domain > Select Subsctiption to Change > Change Status
  • Then, navigate into Subscription or Domain > example.com. On the right-hand side bar of the Hosting Meny, locate and click on Activate or Suspend
Solution 2 (If Using SSH)

Here are the steps involved in the second solution:
  • Using SSH, connect to your server with required credentials
  • Execute the below command which would activate the cronjobs of that subscription (do it even when the subscription remains suspended):
Code:
/usr/local/psa/admin/sbin/crontabmng allow USERNAME
That’s it. Now you shouldn’t have problems with activating Scheduled Tasks.
Author
kumkumsharma
Views
2,430
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from kumkumsharma

Top