• 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.

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