Script to run every 5 minutes


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script to run every 5 minutes
# 8  
Old 06-05-2009
The "/5" syntax is for some versions if Linux.
What Operating System are you using?
# 9  
Old 06-05-2009
Try:

0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/shahnaz/abc.sh >> /home/shahnaz/abc.log 2>&1
# 10  
Old 06-08-2009
I created a file called mycron in /home/mrudula with the following :
0, 5, 10, 15 * * * * (echo "Hello mycron") > /dev/console

then I tried to add this file to the crontab entries by the follwing command
crontab mycron
This is the msg I got -
"mycron":1: bad minute
errors in crontab file, can't install

If I do, crontab -l, mycron contents r echoed on the shell

why did i get such an error before? how can i get it executed correctky so that every 5 minutes i get that msg?

pls help


Thanks
Mrudula
# 11  
Old 06-09-2009
See lstorm2003 example.
No spaces in the minutes field.
(BTW. The name of a crontab file is usually the name of the account owning that crontab).

Code:
0,5,10,15

# 12  
Old 06-09-2009
When you edit your crontab file (crontab -e), all output is mailed to the user, unless a different email address is specified as the value of the MAILTO in your crontab.

crontab output is not typically something that would out put to a terminal.
# 13  
Old 06-09-2009
Quote:
Originally Posted by methyl
The "/5" syntax is for some versions if Linux.
What Operating System are you using?
I use Fedora

-----Post Update-----

Hey guys ... its working ... thank u Smilie

Last edited by mrudula009; 06-09-2009 at 11:16 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cron Job to Run every 2 minutes

Hello Gurus, I want to schedule a cron job which will run every 2 minutes starts at 11:25 AM and 3:25 AM daily. Can you please suggest as how to schedule the job. Thanks- Pokhraj Das (2 Replies)
Discussion started by: pokhraj_d
2 Replies

2. Shell Programming and Scripting

Cron Job to Run for 30 minutes

Hello Gurus, I have a requirement to run a job from cron only for 30 minutes duration daily twice at 8.35 am and 20.35 pm Can you please suggest how to schedule the job? Thanks- Pokhraj (5 Replies)
Discussion started by: pokhraj_d
5 Replies

3. Shell Programming and Scripting

Run this grep every 10 minutes and do something based on the output

OS : Red Hat Linux 6.4 Shell : Bash We have a file called status.txt which will have only 1 line. The content will be the string "Processing" for most of the day. # cat status.txt Processing #I want to write a shell script (notify.sh) which will be executing a grep every 10 minutes . ... (7 Replies)
Discussion started by: kraljic
7 Replies

4. Shell Programming and Scripting

Modify Sleeper script to run every 30 minutes

I would like to modify the below sleeper script to run every 30 minutes at the 29th and 59th minute of the hour. The below script is designed to run every 10 minutes and send an argument to the other script at a particular hour but i want it to run every 30 mins at the 29th and 59th minute of... (6 Replies)
Discussion started by: senormarquez
6 Replies

5. Shell Programming and Scripting

Run cronjob for every 10 minutes

Hi Friends, I have a requirement to run the cronjob for every 10 minutes from 2:00 AM to 6:00 AM. Does the below code works? If not, please advise. * * * * * command to be executed ┬ ┬ ┬ ┬ ┬ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └---------------------------------- day of week (0 - 6) (0 is... (5 Replies)
Discussion started by: srikanthbiradar
5 Replies

6. Shell Programming and Scripting

Run a script continuously for 10 minutes

Hi all!! Im using ksh and my OS is Linux. I want to run a script for ten minutes, starting from my current system time. How to acheive this? Any help appreciated. Thanks in advance (5 Replies)
Discussion started by: Jayaraman
5 Replies

7. 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 * * * xyz.sh 'GA' > xyz.log 2>&1 (9 Replies)
Discussion started by: govindts
9 Replies

8. Shell Programming and Scripting

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

Hi, 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. Thanks. (4 Replies)
Discussion started by: cya
4 Replies

9. Shell Programming and Scripting

Need help howto make a script for Set SNOOP run for 5 minutes

Hi all, I want to monitoring my interface every 6 hours where i want to run snoop command to capture all packet through the interface, so i want running snoop then snoop will run for 5 minutes after that snoop stop then will start again after 6 hours than run for 5 minutes again. thereis any... (9 Replies)
Discussion started by: tindasz
9 Replies

10. Solaris

Schedule to run every 3 minutes - CRONTAB

Hello all, I want to run a script every 3 minutes in os level and to send mail. I scheduled in crontab as 3 * * * * /mnt1/monitorscripts/testdbstart.sh I got mail every one hour and I confirmed that the script is running every 1 hour which doesn't meet my requirment. Where I am... (4 Replies)
Discussion started by: prashanth_gs
4 Replies
Login or Register to Ask a Question