RE: Crontab

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Instead of doing this,
Simply build a script that has a content as follow:

while [ true ]
	do
	script1.sh
	sleep 30
done

It's much simpler and you don't need to run it via cron every minute.
	But you still can control the script and the start/stop via
cron.

Cheers,
Simon

>-----Original Message-----
>From: redhat-list-bounces@xxxxxxxxxx 
>[mailto:redhat-list-bounces@xxxxxxxxxx] On Behalf Of Rohit khaladkar
>Sent: Monday, April 20, 2009 10:59 AM
>To: General Red Hat Linux discussion list
>Subject: Re: Crontab
>
>I guess you cannot have crontab entry in terms of seconds.But 
>you can create
>a script which would repeatedly run your script and give an 
>interval of 30
>seconds.
>For eg, create a tmp.sh script which would run your desired script (say
>script1.sh) after every 30 seconds.
>
>Your tmp.sh script would look like
>
>#!/bin/sh
>script1.sh
>sleep 30
>script1.sh
>sleep 30
>script1.sh
>
>
>Make an entry in the crontab to execute this script every minute.
>
>This should solve the purpose. If anyone comes up with a 
>better idea, feel
>free to go ahead with that, but this is a workaround, if you are stuck.
>
>Thanks!
>Rohit Khaladkar.
>
>On Mon, Apr 20, 2009 at 2:17 PM, ~~~0Pen ~~~ S0uRce ~~~ 
><vijay1313@xxxxxxxxx
>> wrote:
>
>> Hi guys,
>>                     Do any one have  idea that how can i 
>configure crontab
>> to run a script after every 30 seconds,i know about default 
>parameters of
>> crontab and tried  google also,but could not find any thing.
>>
>> Any suggestion Please !!!!
>>
>>
>>
>> --
>> ~~~ 0Pen ~~~ S0uRce ~~~
>> --
>> redhat-list mailing list
>> unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
>> https://www.redhat.com/mailman/listinfo/redhat-list
>>
>-- 
>redhat-list mailing list
>unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
>https://www.redhat.com/mailman/listinfo/redhat-list
>

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux