Running a cron every 30 seconds

后端 未结 19 971
面向向阳花
面向向阳花 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:27

    You can check out my answer to this similar question

    Basically, I've included there a bash script named "runEvery.sh" which you can run with cron every 1 minute and pass as arguments the real command you wish to run and the frequency in seconds in which you want to run it.

    something like this

    * * * * * ~/bin/runEvery.sh 5 myScript.sh

提交回复
热议问题