atdに正確な日付を指定する方法

atdに正確な日付を指定する方法

ここでいくつかの例を見つけました。http://www.thegeekstuff.com/2010/06/at-atq-atrm-batch-command-examples

しかし、たとえば、分、秒、さらに年を含む特定の時間を職場でどのように作成できますか2018-01-15 08:00:00?日付/時刻入力形式は何ですか?

答え1

具体的な例:

$ at 4pm + 5 days
warning: commands will be executed using /bin/sh
at> true
at> <EOT>  # ctrl+d
job 1 at Thu May  4 16:00:00 2023

特定の日付/時間:

$ at 4pm 050423 
warning: commands will be executed using /bin/sh
at> true
at> <EOT>
job 3 at Thu May  4 16:00:00 2023

答え2

マニュアルページを読んでみましたか?

男性:

   At allows fairly complex time  specifications,  extending  the  POSIX.2
   standard.   It  accepts  times of the form HH:MM to run a job at a spe‐
   cific time of day.  (If that time is already  past,  the  next  day  is
   assumed.)   You  may  also specify midnight, noon, or teatime (4pm) and
   you can have a time-of-day suffixed with AM or PM for  running  in  the
   morning or the evening.  You can also say what day the job will be run,
   by giving a date in the form month-name day with an optional  year,  or
   giving  a  date  of  the form MMDD[CC]YY, MM/DD/[CC]YY, DD.MM.[CC]YY or
   [CC]YY-MM-DD.  The specification of a date must follow  the  specifica‐
   tion  of  the  time  of  day.  You can also give times like now + count
   time-units, where the time-units can be minutes, hours, days, or  weeks
   and  you  can  tell  at to run the job today by suffixing the time with
   today and to run the job tomorrow by suffixing the time with tomorrow.

   For example, to run a job at 4pm three days from now, you would  do  at
   4pm  + 3 days, to run a job at 10:00am on July 31, you would do at 10am
   Jul 31 and to run a job at 1am tomorrow, you would do at 1am tomorrow.

   The  definition  of  the   time   specification   can   be   found   in
   /usr/share/doc/at/timespec.

関連情報