• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Resolved How to Automatically Shut Down Servers at Defined Times?

iGraphics

Basic Pleskian
Hello Everyone,

How to Automatically Shut Down Servers at Defined Times?
I want to Shut Down my server on 25/Dec/2017 at 03:00 PM

Can I make that by Scheduled Tasks in Plesk control panel ?
or By SSH ?

Please if by SSH give me the command line for shutting down on 25/Dec/2017 at 03:00 PM

OS ‪CentOS Linux 7.4.1708 (Core)‬
Product Plesk Onyx
Version 17.5.3 Update #35, last updated on Dec 20, 2017 03:31 AM



Thanks
 
Hello Everyone,

How to Automatically Shut Down Servers at Defined Times?
I want to Shut Down my server on 25/Dec/2017 at 03:00 PM

Can I make that by Scheduled Tasks in Plesk control panel ?
or By SSH ?

Please if by SSH give me the command line for shutting down on 25/Dec/2017 at 03:00 PM

OS ‪CentOS Linux 7.4.1708 (Core)‬
Product Plesk Onyx
Version 17.5.3 Update #35, last updated on Dec 20, 2017 03:31 AM



Thanks

Hello,
the easiest will be to add a cronjob with the command crontab -e , and to add the following line :
Code:
0 3 25 * * /sbin/shutdown now
 
Hi,

One of the ways:

Use command `at` and `atd` daemon:
1. Install at
# yum install -y at

2. Start atd
# service atd start

3. Plan to do something:
# echo "touch /tmp/1.txt" | at 1629 Dec 20
job 1 at Wed Dec 20 16:29:00 2017


4. Check:
# date
Wed Dec 20 16:29:09 NOVT 2017
# ls -la /tmp/1.txt
-rw-r--r-- 1 root root 0 Dec 20 16:29 /tmp/1.txt


So, if it works for you, you can use any other date and any other command. If you execute this command as user, use `sudo`.
 
Thanks for reply, What about this command line:
Code:
screen -d -m shutdown -h +$((($(date +%s -d "12/25 15:00 2017") - $(date +%s)) / 60))
 
Back
Top