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:
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:
There are two ways you can fix this error.
Solution 1
Here are the steps you need to follow:
Here are the steps involved in the second solution:
That’s it. Now you shouldn’t have problems with activating Scheduled Tasks.
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
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
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
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