• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • 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.

Setup a cron job script to restart Plesk / Virtuozzo?

Justin Clarke

Regular Pleskian
This article (http://kb.odin.com/en/118) shows you how to restart Plesk:

~# /etc/init.d/psa stop
~# /etc/init.d/psa start

What I'm really after is the command that is behind the "Restart VPS" button function on the Virtuozzo Panel? Or does this do the same thing?

Can these commands be me made into a cron job? Or won't this work as on the stop command cron will stop?

Any info would be great. Thanks.
 
I think I found the command to do a Virtuozzo restart. It's "vzctl restart <CT_ID>" (see here).

I need a container ID to append to the command. When I do a manual "Restart VPS" from the button in the Virtuozzo Panel the details show as:

Start Process Completed
Fri Aug 6 23:54:40 2010 Click here to open/close operation details.Restart VPS #55136336 Completed
Fri Aug 6 23:54:40 2010 Operation restart with the VPS(s) VEID55136336 is started.
Fri Aug 6 23:54:40 2010 Stopping VE ...
Fri Aug 6 23:54:58 2010 VE was stopped
Fri Aug 6 23:54:58 2010 VE is unmounted
Fri Aug 6 23:54:58 2010 Starting VE ...
Fri Aug 6 23:54:58 2010 VE is mounted
Fri Aug 6 23:54:58 2010 Setting devperms 20002 dev 0x7f00
Fri Aug 6 23:54:58 2010 Setting devperms 20007 dev 0xac8
Fri Aug 6 23:54:58 2010 Adding port redirection to VE(1): 1234 5678
Fri Aug 6 23:54:58 2010 Adding IP address(es): 111.11.222.222
Fri Aug 6 23:54:59 2010 Hostname for VE set: 123.server-server.info
Fri Aug 6 23:54:59 2010 File resolv.conf was modified
Fri Aug 6 23:54:59 2010 Configure meminfo: 262144
Fri Aug 6 23:54:59 2010 Setting devperms 60010 dev 0xf6
Fri Aug 6 23:54:59 2010 VE start in progress...
Fri Aug 6 23:54:59 2010 Operation restart with the VPS(s) VEID55136336 is finished successfully.
Fri Aug 6 23:54:59 2010 Complete Process Completed

So is 55136336 my container ID? So if I run a "vzctl restart 55136336" that will do the same job as clicking the "Restart VPS" from the button in the Virtuozzo Panel?

Or should I just use a "shutdown -r now" command??

Thank you.
 
Last edited:
Yes, "Restart VPS" is the same that 'vzctl restart VPS_ID'.
 
Thanks.

So would that command work running from a cron job? Or would it stop the cron job before it's finished running the command?
 
vzctl command can be started only from Virtuozzo hardware node but not from VPS.
 
Back
Top