리눅스는 크론탭 최소로 조작이 가능한 단위가 분이다. (스프링 스케줄러는 초까지 가능) 

 

그래서 섬세한 실행이 필요하면 아래와 같이 추가하면 리눅스 크론탭에서도 초단위로 조작이 가능하다. 

 

 

crontab -l 

* * * * * /bin/sh /tony/cpu_mem.sh 
* * * * * ( sleep 10; /bin/sh /tony/cpu_mem.sh )
* * * * * ( sleep 20; /bin/sh /tony/cpu_mem.sh )
* * * * * ( sleep 30; /bin/sh /tony/cpu_mem.sh )
* * * * * ( sleep 40; /bin/sh /tony/cpu_mem.sh )
* * * * * ( sleep 50; /bin/sh /tony/cpu_mem.sh )

위와 같이 추가하면 10초단위로 실행이 된다. 

+ Recent posts