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.

관련 정보