How to running cron job every 5 minutes,seconds,hours,days

How to running cron job every 5 minutes,seconds,hours,days

How to running cron job every 5 minutes,seconds,hours,days. How to running a script a specific interval using cronjob in linux. 

To execute a cronjob every 5 minutes
*/5 * * * * /home/huupv/script.sh
To execute a cronjob every 5 hours
0 */5 * * * /home/huupv/script.sh
How to running a job every 5 seconds

$ cat every-5-seconds.sh
#!/bin/bash
while true
do
 /home/huupv/script.sh
 sleep 5
done






$ nohup ./every-5-seconds.sh &
To execute a cronjob every 5th weekday
0 0 * * 5 /home/huupv/script.sh
or
0 0 * * Fri /home/huupv/script.sh

0=Sun
1=Mon
2=Tue
3=Wed
4=Thu
5=Fri
6=Sat

Comments

Popular posts from this blog

zimbra some services are not running [Solve problem]

Bash script list all IP addresses connected to Server with Country Information

Zimbra Client host rejected Access denied fixed