Sleep until a specific time/date

前端 未结 18 2112
栀梦
栀梦 2020-11-28 21:13

I want my bash script to sleep until a specific time. So, I want a command like \"sleep\" which takes no interval but an end time and sleeps until then.

The \"at\"-d

18条回答
  •  Happy的楠姐
    2020-11-28 21:42

    I actually wrote https://tamentis.com/projects/sleepuntil/ for this exact purpose. It's a bit over-kill most of the code comes from BSD 'at' so it's fairly standard-compliant:

    $ sleepuntil noon && sendmail something
    

提交回复
热议问题