Visit Our UNIX and Linux User Community

How to run a script everyday between 7 and 8 pm with the time interval of 5 minutes?

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to run a script everyday between 7 and 8 pm with the time interval of 5 minutes?
# 1  
Old 10-04-2010
How to run a script everyday between 7 and 8 pm with the time interval of 5 minutes?


Can someone help me in running a cronjob everyday between 7 and 8 pm with the time interval of 5 minutes in between to repeat that script. The script is so small and I need that to run daily between this time. Please if possible provide me the syntax for this logic.

# 2  
Old 10-04-2010
0,5,10,15,20,25,30,35,40,45,50,55 19 * * * /path/to/

This User Gave Thanks to jim mcnamara For This Post:
# 3  
Old 10-04-2010
Thanks Jim Smilie

---------- Post updated at 08:27 AM ---------- Previous update was at 07:31 AM ----------

Do i need to create a new file with the code
<0,5,10,15,20,25,30,35,40,45,50,55 19 * * * /path/to/> and make it to run or shall i append this line at the top of my script which i need to run?

# 4  
Old 10-04-2010
You need to add the contents shared by Jim to your crontab file. Refer crontab command for scheduling a task.

# 5  
Old 10-04-2010
This also works:
*/5 19 * * * /path/to/

Previous Thread | Next Thread
Test Your Knowledge in Computers #609
Difficulty: Medium
You cannot embed Python within your C/C++ programs.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Run Bash Script thrice & then interval for 10 mins.

Hi... I am very new to shell scripting. I have written a script with help of this forum and some googling and it works the way I want it to. Currently this script checks for my SIP trunk registration every 5 seconds, if registration is not available then it reboots my router through telnet... (4 Replies)
Discussion started by: jeetz
4 Replies

2. Solaris

CPU and Memory Utilization every 5 minutes interval

Hi, Anyone can help me on how to collect the CPU and Memory usages every 5 minutes interval. Thanks in advance. Regards, FSPalero (4 Replies)
Discussion started by: fspalero
4 Replies

3. Shell Programming and Scripting

Main script triggers second and it has to run at specific interval

Hi Friends, I am newbie to shell programming and I am stuck trying to accomplish following task.We use Bamboo CI which executes script1 passing parameters. This Main script executes script2 as backend process as part of one of it statements. Task of script2 is to essentially check whether a... (0 Replies)
Discussion started by: aditya206
0 Replies

4. UNIX for Dummies Questions & Answers

Run the shell script for every 15 minutes?

I want to run my shell script for every 15 minutes starting from 12:20AM. I am passing parameter GA to shell script. Does this work? Any one please comment on this? 20 0-23/15 * * * 'GA' > xyz.log 2>&1 (9 Replies)
Discussion started by: govindts
9 Replies

5. Shell Programming and Scripting

Script to run every 5 minutes

Hello all, I want to run a script every 5 minutes. How to accomplish this task? Thanks in advance Mrudula (12 Replies)
Discussion started by: mrudula009
12 Replies

6. UNIX for Dummies Questions & Answers

Run script in the background with a time interval

I have a script I want to run in the background, and I have looked it up but I am not exactly sure how to do. First of all to run it in the background do you have to put something in the script or is it just a command when you go to run it. I found this solution to it but once again I am not to... (2 Replies)
Discussion started by: mauler123
2 Replies

7. Shell Programming and Scripting

run script 1 minute interval without CronTab

I am using Solaris 9. I wish to run my script every 1 minute inteval. Though i can run it using below entry in crontab. * * * * /export/home/username/script/file_exist_& in short above script will check whether a specific file exist in a directory. If it found it will inovke another... (10 Replies)
Discussion started by: thepurple
10 Replies

8. Shell Programming and Scripting

script to run repeatedly after a fixed interval of time

Hi , I am working on the following script . I want this script to run and scan the log file repeatedly after 3 hours. This script will run & scan just for the current date logs and after every 3 hours. Kindly advice what to add in this script for this purpose. #!/bin/sh diff common.log... (3 Replies)
Discussion started by: himvat
3 Replies

9. Shell Programming and Scripting

Generating files with time interval of fifteen minutes

Hi Guys, I have two dates as start date and end date.. i need to generate files within these two dates with time interval of half an hour.... i.e. Start Date=25/09/07 12:00:00 End Date=26/09/07 12:00:00 Now i need to generate files every half an... (0 Replies)
Discussion started by: aajan
0 Replies

10. Shell Programming and Scripting

Shell Script Run Interval to be dynamic

Hi All. I have a script which has to be run periodically. The frequency of its run will be decided by a Database stored value PollRate. e.g. If PollRate value is 300secs, then the script should be executed every 5 minutes, if it's 1500secs, it should execute every 15 minutes. Is there... (5 Replies)
Discussion started by: rahulrathod
5 Replies

Featured Tech Videos