"리눅스 1회성 예약작업 at, atd"의 두 판 사이의 차이

47번째 줄: 47번째 줄:
==같이 보기==
==같이 보기==
*[[크론]] (반복 예약작업)
*[[크론]] (반복 예약작업)
*[[윈도우 at]]


==주석==
==주석==

2014년 3월 12일 (수) 00:10 판

at
/usr/bin/at
atd
/usr/sbin/atd
앳데몬, 앳D

1 at

  • 지정한 명령어를 지정한 시각에 1회 실행하도록 하는 리눅스 명령어

2 atd

  • at 수행을 위한 데몬
[root@jmnote ~]# service atd status
atd (pid  2205) is running...

3 실습

[root@jmnote ~]# ll /root/hello.txt
ls: /root/hello.txt: No such file or directory
[root@jmnote ~]# date
Thu Feb 13 23:27:03 KST 2014
[root@svn0 ~]# echo "echo hello > /root/hello.txt" | at 2330 feb 13
job 3 at 2014-02-13 23:30
Can't open /var/run/atd.pid to signal atd. No atd running?
→ 3번 작업으로 등록됨. 그런데 atd가 작동중이 아님
[root@jmnote ~]# atq
3	2014-02-13 23:30 a root
[root@jmnote ~]# service atd start
Starting atd:                                              [  OK  ]
→ atd가 작동중이어야 atq 예약작업이 수행된다.
[root@jmnote ~]# date
Thu Feb 13 23:31:53 KST 2014
[root@jmnote ~]# atq
[root@jmnote ~]# ll /root/hello.txt
-rw-r--r-- 1 root root 6 Feb 13 23:30 /root/hello.txt
→ 23:30에 hello.txt 생성됨. atq 목록에서 사라짐[1]

4 같이 보기

5 주석

  1. atd가 작동중이 아니라면 예약작업이 수행되지 않으며, atq 목록에 계속 남아있게 된다.

6 참고 자료

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}