- Plesk for Linux
Unable to activate a scheduled Task in Plesk > Domains > Scheduled Tasks - after refresh it is still shown as disabled
This is expected behavior when the main domain of the subscription is suspended - when it is suspended the following command is run automatically to stop the execution of crontab commands of a specific user account:
# /usr/local/psa/admin/sbin/crontabmng deny USERNAME
This command adds the value
##!PSA!## into the crontab user file preventing a scheduled task from execution so the files starts to look like the following:
# 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
Use one of the following solutions:
Log into Plesk
Go to Subscriptions or Domains > Select subscriptions to change > click on Change Status:
Go to Subscriptions or Domains > example.com and click on Activate or Suspend in the Hosting menu on right side bar.
Connect to the server via SSH.
Run the following command to activate the cronjobs of that subscription (even if the subscription should remain suspended):
# /usr/local/psa/admin/sbin/crontabmng allow USERNAME