How to run tasks under a minute in Linux? Setting cron job under a minute in Linux.
The cronjob services are supports to perform tasks once every minute. So, if we want to trigger that tasks under a minute we can use loops and sleep command.
Probably, you could figure it with another way. But, I like to solve the problems without use other tools and services.

How to run cron jobs under a minute?
In the following code snippet, the commands are running in every 5 seconds. You can change it according to your needs. You can write your commands in between do and done. If you want to run tasks in every seconds you should change from {0..11} to {0..59} or if you want to different timing you can edit { } block.
#!/bin/bash for i in {0..11} do echo "This is a test in loop $i" date sleep 5 done
Also, it’s possible to trigger another bash script in this loop like the following;
#!/bin/bash for i in {0..11} do /bin/bash /root/anotherScript.sh sleep 5 done
Setting cron job
You should add your script to crontab file for run every minute like the following.
* * * * * /bin/bash /root/myJob.sh
That’s it!