cron job every 2 min


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers cron job every 2 min
# 1  
Old 04-02-2007
cron job every 2 min

hi guys!

I have problem with cron Smilie
2,4,6,8,10,12,14,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60 * * * * /usr/local/george/update.py

I try this to schedule the script to run every second min forever Smilie but it doesn't work Smilie

any idea?

thanks in advance
george
# 2  
Old 04-02-2007
this is the output:

$ sudo crontab -u george cronjob
11:54:40 installing file /usr/local/george/cronjob for user george
/usr/local/george/cronjob:1: Error while reading minutes field: skipping line.
11:54:40 george's fcrontab contains no entries : removed.
Modifications will be taken into account right now.

thanks
# 3  
Old 04-02-2007
Quote:
Originally Posted by georgeplus
hi guys!

I have problem with cron Smilie
2,4,6,8,10,12,14,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60 * * * * /usr/local/george/update.py

I try this to schedule the script to run every second min forever Smilie but it doesn't work Smilie

any idea?

thanks in advance
george
i think the minute here starts from 0-59 and logically 60 is invalid..

try this..

1-59 * * * * /usr/local/george/update..py
# 4  
Old 04-02-2007
Hi,
Instead of mentioning a full list of values, mention the cron like this
* * * * * /usr/local/george/update..py
and inside the .py script check for the minute and then run it.
(You may need to run it only when it is either even or odd minutes.)

Thanks
Raghuram
# 5  
Old 04-02-2007
thanks!

I just use*/2 and works, it seems to...

when I
ps aux | grep crond

I don't see any deamon Smilie

I try sudo crond but "command not found" !!

I use gentoo
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How to run cron entry every 5 min during office hours only?

Hi I need to setuop a cron entry to run every 5 min, only in office hours (between 8:00AM to 18:00PM, I did the following: 0,5,10,15,20,25,30,35,40,45,50,55 8,9,10,11,12,13,14,15,16,17,18 * * * /home/xxx/zzz.ksh But somehow does not work. Could it be wrong? (8 Replies)
Discussion started by: fretagi
8 Replies

2. Shell Programming and Scripting

Cron job - Need to run Cron every quarter at particular time

Hi, 1) If some job supposed to run on 1st of every month at 7 AM In cron job when we have a blackout on the 1st ( i.e when 1st falls on a sunday ) how can we make the job run the next business day? 2) How can we run a job on 25th of every quarter 7 AM(jan,apr,jul,oct) And if 25th... (5 Replies)
Discussion started by: System Admin 77
5 Replies

3. UNIX for Dummies Questions & Answers

Cron every 5 min

Hi, I am trying to run a script in cron every 5 min in SOLARIS 10 When I do5 * * * * /path to fileor*/5 * * * * /path to file Doesn't work. Please let me know what should I put in the cron entry Thanks (2 Replies)
Discussion started by: Rossdba
2 Replies

4. Shell Programming and Scripting

Commented cron job -- cron monitoring

Hi I have a requirement to write a shell script,that will check the all commented job in cron job.Please help !! (2 Replies)
Discussion started by: netdbaind
2 Replies

5. Solaris

Cron job running even after cron is removed

Hi , I have removed a cron for particular user , but cron job seems to be running even after the cron entry is removed. The purpose of the cron was to sendmail to user ( it uses mailx utility ) I have restarted cron and sendmail service still user is getting mail alerts from the cron job. And... (4 Replies)
Discussion started by: chidori
4 Replies

6. UNIX Desktop Questions & Answers

Cron Job

Could some one help to so that I can set up a cron job such that it will check the changes of a particular network folder??? (5 Replies)
Discussion started by: coolmaddy
5 Replies

7. Shell Programming and Scripting

CRON Job

Hi all, Pretty new to CRON but have been messing with Ubuntu for a while now Here is the situation/problem I have run into you. I currently run a very basic back procedure by executing a daily CRON job which copies all data from one directory to a USB drive & date stamps the copy:- cp... (2 Replies)
Discussion started by: 2scoops
2 Replies

8. Shell Programming and Scripting

Cron job

I am trying to set up a simple cron job but it won't work Is there a special directory that the target program has to run from ?? I noticed that all the other jobs in the file were in /usr/local/bin but even when I put my target script in there it didn't run. Anyone have any idea why ?? ... (2 Replies)
Discussion started by: zapper222
2 Replies

9. Solaris

cron job starts new cron proccess

I run cron in solaris 10 zone. One cron job which syncing files to nfs mounted on container, creates after finishing another cron proccess(/usr/sbin/cron), and after 100 existing cron proccesses next cron job will not start. It's too weird for me, I'm not able to solve this problem. Theoretically... (3 Replies)
Discussion started by: ron76
3 Replies

10. UNIX for Dummies Questions & Answers

CRON usage for CRON job

can anybody explain the usage of CRON for adding a cron job. please provide an example also for better understanding !!! Thanks (1 Reply)
Discussion started by: skyineyes
1 Replies
Login or Register to Ask a Question