• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Scheduled Tasks / crontab with @reboot

Werring

New Pleskian
I have in crontab for the root user a command that has to run on startup (@reboot).

However, it appears that the Scheduled Tasks manager cant really cope with it.
(whenever i add a task, it gets removed, and i have to use the commandline to add it again.)

is there a way to use @ reboot in root crontab and not make it break by plesk?
 
Yes, You can add new cron on your server under the root user through following command and you can use @reboot

Code:
crontab -e
 
Yes, but whenever i add/update/remove a Scheduled Task through the webinterface of plesk after I added the cronjob with `crontab -e`.
the @reboot job gets deleted.
 
I have now,
but still whenever I add a new task with the plesk panel (after I edited it with crontab -e) it deletes the cronjob.

Example:
Current cron:
Code:
0       1       *       *       1       /opt/psa/libexec/modules/watchdog/cp/secur-check
0       1       *       *       1       /opt/psa/libexec/modules/watchdog/cp/send-report weekly
10      1       *       *       *       /opt/psa/libexec/modules/watchdog/cp/clean-sysstats
15      1       *       *       *       /opt/psa/libexec/modules/watchdog/cp/pack-sysstats day
15      1       *       *       1       /opt/psa/libexec/modules/watchdog/cp/pack-sysstats week
15      1       1       *       *       /opt/psa/libexec/modules/watchdog/cp/pack-sysstats month
15      1       1       *       *       /opt/psa/libexec/modules/watchdog/cp/pack-sysstats year
20      1       *       *       *       /opt/psa/libexec/modules/watchdog/cp/clean-events
0       3       *       *       7       /opt/psa/libexec/modules/watchdog/cp/clean-reports
@reboot /path/to/command

As you can see, my @reboot cronjob has been removed

I go to the tasks page on the panel and disable something (pack-stats year).

Now my cron file looks like:
Code:
0       1       *       *       1       /opt/psa/libexec/modules/watchdog/cp/secur-check
0       1       *       *       1       /opt/psa/libexec/modules/watchdog/cp/send-report weekly
10      1       *       *       *       /opt/psa/libexec/modules/watchdog/cp/clean-sysstats
15      1       *       *       *       /opt/psa/libexec/modules/watchdog/cp/pack-sysstats day
15      1       *       *       1       /opt/psa/libexec/modules/watchdog/cp/pack-sysstats week
15      1       1       *       *       /opt/psa/libexec/modules/watchdog/cp/pack-sysstats month
##      15      1       1       *       *       /opt/psa/libexec/modules/watchdog/cp/pack-sysstats year
20      1       *       *       *       /opt/psa/libexec/modules/watchdog/cp/clean-events
0       3       *       *       7       /opt/psa/libexec/modules/watchdog/cp/clean-reports
        @reboot
 
Well, a boring error, I've never had before in more than ten years of virtuozzo/OpenVZ/KVM. First error at Strato VPS Server with Plesk Onyx on Ubuntu 16LTS.

(at)all: Thanks for your good help.

Situation :

Could not connect by ssh, calling plesk I've got the issued error.

Solution as above in short terms:
  1. Booting in Repair-Mode, going by SFTP or Shell to:
    /repair/var/spool/cron/crontabs/root

  2. Edit the file "root", add the following line after the existing cron tasks:
    @Reboot[/USER] mkdir -p /run/lock/lmlib && chown root:lock-manager /run/lock/lmlib && chmod -R 0770 /run/lock/lmlib

  3. Exit the shell

  4. Reboot in "Normal Mode"

  5. Now call Plesk > Scheduled Tasks

  6. Enter that Cron Task for root, probably you need it only one time:
    */1 * * * * mkdir /var/run/sshd && chmod 0755 /var/run/sshd && /etc/init.d/ssh start

  7. Execute the cron at once or wait a minute

  8. Then try to connect by ssh - READY

  9. Maybe you can deactivate the last mentioned cron task now or set it maybe to repeat after 1 year ;-)
 
Last edited:
Hello,

I want to do a nightly reboot and scheduled a cronjob but it's not working.
probably a wrong command but I can't find a list with possible commands.

Cronreboot.JPG
 
Why are we rebooting things nightly? This isn't some home PC running Windows XP....
 
Back
Top