[Ilugc] My deceptively simple shutdown script after music playsq

  • From: knura9@xxxxxxxxx (Arun Khan)
  • Date: Mon May 24 11:43:50 2010

On Sat, May 22, 2010 at 11:31 PM, Raja Subramanian
<rajasuperman@xxxxxxxxx> wrote:

On Wed, May 12, 2010 at 8:43 PM, Arun Khan <knura9@xxxxxxxxx> wrote:
I do something similar for overnight downloads on my netbook. ?The
system shuts down when there is 0 TCP connection.

I just use "at", but I should look into something more sophisticated.

My typical "at" usage:

? ?liraz:~# at now + 5 hours
? ?warning: commands will be executed using /bin/sh
? ?at> /sbin/poweroff
? ?at> <EOT>
? ?job 12 at Sun May 23 04:24:00 2010

'at' is a one time deal.  It is fine if you want your machine to
shutdown at a specific time.  I also use it to _start_ the download of
iso or big package files after midnight but what about shutting down
the machine after the download is complete?  It is not deterministic
therefore you need to monitor the no. of TCP connections on your
system at regular intervals.  IMO, cron is the best option.

-- Arun Khan

Other related posts: