To schedule a task to be run in every 5 minutes, you can set up a cron job in Linux.
You can use your favorite text editor to open the file:
$ vim /etc/crontab
Let’s assume that your script name is
/home/theuser/script.sh. To make it run every 5 minutes, add the following line to the end of the file:
*/5 * * * * /home/theuser/script.sh
The first entry
*/5 defines the “at every 5 minutes”.