Running a cron every 30 seconds

后端 未结 19 950
面向向阳花
面向向阳花 2020-11-22 10:56

Ok so I have a cron that I need to run every 30 seconds.

Here is what I have:

*/30 * * * * /bin/bash -l -c \'cd /srv/last_song/releases/2012030813315         


        
19条回答
  •  南笙
    南笙 (楼主)
    2020-11-22 11:32

    in dir /etc/cron.d/

    new create a file excute_per_30s

    * * * * * yourusername  /bin/date >> /home/yourusername/temp/date.txt
    * * * * * yourusername sleep 30; /bin/date >> /home/yourusername/temp/date.txt
    

    will run cron every 30 seconds

提交回复
热议问题