0

I have to run 3 shell scripts at intervals of 15 seconds continuously and automatically when the system runs.

Is it possible to add a cronjob with the following interval?

0.25 * * * * sudo bash /home/ckoy-admin/HAS_system/execute/FS.sh

I am trying to use 0.25 minutes, but it does not work.

Debopam Parua
  • 460
  • 1
  • 4
  • 24
  • 1
    See: [How to get a unix script to run every 15 seconds?](https://stackoverflow.com/q/1034243/3776858) – Cyrus Jun 03 '17 at 07:14
  • Possible duplicate of [How to get a unix script to run every 15 seconds?](https://stackoverflow.com/questions/1034243/how-to-get-a-unix-script-to-run-every-15-seconds) – Dima Chubarov Jun 03 '17 at 07:15
  • 1
    cron doesn't support sub-minute scheduling, trying to "trick" it is optional but I'm not sure it's wise. Use a tool that supports such a requirement , for example, Java's `ScheduledThreadPoolExecutor` [supports such scheduling](https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledThreadPoolExecutor.html#schedule(java.lang.Runnable,%20long,%20java.util.concurrent.TimeUnit)) – Nir Alfasi Jun 03 '17 at 07:18

0 Answers0