have cron alternative, need advice

have cron alternative, need advice

Post by fiat_lu » Sat, 04 Nov 2000 05:55:17



On the system I have an account on, I had some crontab jobs I wanted ran
at specifically 5:30am on Sunday and Wednesday mornings, to backup a
datebase. Claiming that cron was too much of a strain on the system, the
admins disabled cron and implemented an alternative they created
themselves. All users were instructed to put a list of the files/scripts
they want executed in the .run file in their home directories. And every
5-10 minutes the run daemon would go to each user's .run file and run
the scripts listed in this file.

But all I wanted to do was run a script that backed up some databases
twice a week. I don't want to back them up every 5-10 minutes. I guess I
could write a new script that uses a counter of sorts, that would be
fired by this run daemon, like so:
(this is just psuedocode, no need to flame me that my syntax is wrong ;)
)

read counter-file into num
if num = 1000 then
        num = 0
        write num to counter-file
        fire database backup script
else
        num = num + 1
        write num to counter-file
endif

But it would take experimentation to find the right value to use where
the 1000 is.  And since they said your script gets ran every 5-10 mins,
it wouldnt be at precisely the same time every every week. Basically,
I'm wondering, is there some other makeshift solution someone can come
up with? Thanks.

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

have cron alternative, need advice

Post by Barry Margoli » Sat, 04 Nov 2000 06:53:40




>On the system I have an account on, I had some crontab jobs I wanted ran
>at specifically 5:30am on Sunday and Wednesday mornings, to backup a
>datebase. Claiming that cron was too much of a strain on the system, the
>admins disabled cron and implemented an alternative they created
>themselves. All users were instructed to put a list of the files/scripts
>they want executed in the .run file in their home directories. And every
>5-10 minutes the run daemon would go to each user's .run file and run
>the scripts listed in this file.

They think running scripts every 5-10 minutes is *less* of a strain on the
system than using cron to run them only when they're really desired?
Sounds idiotic to me.

Quote:>But all I wanted to do was run a script that backed up some databases
>twice a week. I don't want to back them up every 5-10 minutes. I guess I
>could write a new script that uses a counter of sorts, that would be
>fired by this run daemon, like so:

Why don't you have it check the date and time?

# Only run Sunday and Wednesday, between 5:30 and 5:34.
case `date +%a` in
  Sun|Wed) ;;
  *) exit ;;
esac
hour=`date +%H`
min=`date +%M`
if [ $hour -ne 5 -o $min -lt 30 -o $min -gt 34 ]
then exit
fi

--

Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

have cron alternative, need advice

Post by fiat_lu » Sun, 05 Nov 2000 00:00:34


Quote:> They think running scripts every 5-10 minutes is *less* of a strain on
> the system than using cron to run them only when they're really
> desired?
> Sounds idiotic to me.

tell me about it.

Quote:> Why don't you have it check the date and time?

> # Only run Sunday and Wednesday, between 5:30 and 5:34.
> case `date +%a` in
>   Sun|Wed) ;;
>   *) exit ;;
> esac
> hour=`date +%H`
> min=`date +%M`
> if [ $hour -ne 5 -o $min -lt 30 -o $min -gt 34 ]
> then exit
> fi

Using the date never dawned on me. You're clever. Thanks a bunch.

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

1. need advice having 2 default route on one server

currently I have a informix server on a HACMP configuration. there is
total of 3 NIC on the server.  2 for HACMP and 1 for replication of
informix data and backup.  two nic cards (hacmp) are on one network
10.10.10.X and 1 nic on a sperate network 192.0.0.x

here is the problem - can you have 2 default gateway for the two
networks? i know it can be done but what are the problems? adviseable
or not? will there be problems routing?

2. ?: marvel video cap under linux

3. Having cfgadm to use alternative drivers for st and sgen

4. Problem with low level formatting?

5. cron.deny and cron.allow files for CRON management

6. Setting JDK_HOME?

7. alternative to cron?

8. lost passwd

9. cron alternative sought

10. cron daemon alternatives

11. Having problems with CRON

12. Having CRON Jobs NOT mail results

13. Ping from cron not having same effect as ping from console