每秒执行一次 #!/bin/bash step=1 #间隔的秒数,不能大于60 for (( i = 0; i < 60; i=(i+step) )); do echo `date +%F\ %T` sleep $step done exit 0
* * * * * sh /home/test/test.sh
Last updated 2 years ago