🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.fan.holy-mother-megan
Article #14611

Re: Odp: Odp: Odp: Odp: Odp: Odp: Odp: Odp: Quest

#14611
From: Dariusz Ankowski
Date: Sun, 06 Apr 2003 05:13
74 lines
4590 bytes
Adam Wysocki (ad...@wysocki.lodz.pdi.net) wypalcował(a):
> 05.04.03 Dariusz Ankowski wrote:
> 
>> Aktualnie u siebie korzystam z fcrona - jak dla mnie zajebisty, tylko
>> ssie binarny format dla wpisów do niego. Znaczy się opisuję normalnie
>> tekstowo, a on to sobie konwertuje na binarną wersję dla siebie. Ale 
>> jak dla mnie i tak jest miły. Ma fajną składnię ;)
> 
> Co ma, czego nie ma vixie cron?

Prostotę co niektórych operacji. Albo uruchamianie polecenia w
zależności od zajętości systemu. Z racji, że /me jeszcze śpi, to rzucę
przykładami z manuala:

#v+
# Get our mails every 30 minutes
@ 30 getmails -all

# make some security tests every 48 hours of system up time,
# force a mail to be sent to root even if there is no output
@mailto(root),forcemail 2d /etc/security/msec/cron-sh/security.sh

# get mails every hours past 20, 21, 22, and 24 minutes.
20-24~23 * * * * getmail
#v-

Inny przykład (też z manuala)
#v+
For example:

%nightly,mail(no) * 21-23,3-5 echo "a nigthly entry"

will  run  the command once each night either between 21:00 and 23:59,
or between 3:00 and 5:59 (it will run as soon as possible. To change
that, use option random) and won't send mail (due  to  the  optional
use  of option mail).
#v-

I jeszcze (też z manuala więc nie biorę odpowiedzialności za sens tych
poleceń ;) ):

#v+
# reset options to default and set runfreq for lines below
!reset,runfreq(7)

# run once every 7 matches (thanks to the declaration above),
# so if system is running every day at 10:00, this will be
# run once a week
& 0 10 * * * echo "if you got this message last time 7 days ago,\
 this computer has been running every day at 10:00 last week.\
 If you got the message 8 days ago, then the system has been down\
 one day at 10:00 since you got it, etc"

# wait every hour for a 5 minutes load average under 0.9
@lavg5(0.9) 1h echo "The system load average is low"

# wait a maximum of 5 hours every day for a fall of the load
# average
@lavgand,lavg(1,2.0,3.0),until(5h) 1d echo "Load average is going down"

# wait for the best moment to run a heavy job
@lavgor,lavg(0.8,1.2,1.5),nice(10) 1w echo "This is a heavy job"

# run once every night between either 21:00 and 23:00 or
#   between 3:00 and 6:00
%nightly,lavg(1.5,2,2) * 21-23,3-6 echo "It's time to retrieve \
 the latest release of Mozilla !"
#v-

-- 
Wyobraźnia bez wiedzy może stworzyć                       |  Dariusz Ankowski
rzeczy piękne. Wiedza bez wyobraźni                       | do...@kaja.int.pl
najwyżej doskonałe.                                       |     ICQ: 18277709
                -- Albert Einstein                        |       GG: 1693324
Technical Details
Message-ID: <slrnb8vdr2.8c.dosiu@dosiu.ds.pg.gda.pl>
Path: mbox-mo1.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!newsfeed.tpinternet.pl!news.task.gda.pl!not-for-mail
References: <b5pbdv$bq3$6@atlantis.news.tpi.pl> <slrnb848vk.3nd.dosiu@dosiu.ds.pg.gda.pl> <gophi.243845@nascom.nasa.gov> <slrnb86ami.8aj.dosiu@dosiu.ds.pg.gda.pl> <Pine.LNX.4.21.0303271902030.19340-100000@troll> <slrnb86fev.8aj.dosiu@dosiu.ds.pg.gda.pl> <gophi.248441@nascom.nasa.gov> <slrnb89no9.2lv.dosiu@dosiu.ds.pg.gda.pl> <gophi.249194@nascom.nasa.gov> <slrnb8an26.2lv.dosiu@dosiu.ds.pg.gda.pl> <gophi.249788@nascom.nasa.gov> <slrnb8ciq9.q71.dosiu@dosiu.ds.pg.gda.pl> <gophi.252215@nascom.nasa.gov> <slrnb8hnce.fj7.dosiu@dosiu.ds.pg.gda.pl> <gophi.257118@nascom.nasa.gov> <slrnb8lgmg.8aj.dosiu@dosiu.ds.pg.gda.pl> <gophi.260484@nascom.nasa.gov> <b6glmj$pqn$1@atlantis.news.tpi.pl> <gophi.263621@nascom.nasa.gov> <slrnb8pje5.tr.dosiu@dosiu.ds.pg.gda.pl> <gophi.264945@nascom.nasa.gov> <slrnb8qjbk.89.dosiu@dosiu.ds.pg.gda.pl> <gophi.265988@nascom.nasa.gov> <slrnb8tcj0.ekq.dosiu@dosiu.ds.pg.gda.pl> <gophi.268657@nascom.nasa.gov>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!newsfeed.tpinternet.pl!news.task.gda.pl!not-for-mail
From: Dariusz Ankowski <do...@kaja.int.pl>
Newsgroups: alt.fan.holy-mother-megan,alt.pl.fan.gopher
Subject: Re: Odp: Odp: Odp: Odp: Odp: Odp: Odp: Odp: Quest
Followup-To: alt.pl.fan.gopher
Date: Sun, 6 Apr 2003 05:13:07 +0000 (UTC)
Organization: PeGie
Lines: 74
Message-ID: <slrnb8vdr2.8c.dosiu@dosiu.ds.pg.gda.pl>
References: <b5pbdv$bq3$6@atlantis.news.tpi.pl> <slrnb848vk.3nd.dosiu@dosiu.ds.pg.gda.pl> <gophi.243845@nascom.nasa.gov> <slrnb86ami.8aj.dosiu@dosiu.ds.pg.gda.pl> <Pine.LNX.4.21.0303271902030.19340-100000@troll> <slrnb86fev.8aj.dosiu@dosiu.ds.pg.gda.pl> <gophi.248441@nascom.nasa.gov> <slrnb89no9.2lv.dosiu@dosiu.ds.pg.gda.pl> <gophi.249194@nascom.nasa.gov> <slrnb8an26.2lv.dosiu@dosiu.ds.pg.gda.pl> <gophi.249788@nascom.nasa.gov> <slrnb8ciq9.q71.dosiu@dosiu.ds.pg.gda.pl> <gophi.252215@nascom.nasa.gov> <slrnb8hnce.fj7.dosiu@dosiu.ds.pg.gda.pl> <gophi.257118@nascom.nasa.gov> <slrnb8lgmg.8aj.dosiu@dosiu.ds.pg.gda.pl> <gophi.260484@nascom.nasa.gov> <b6glmj$pqn$1@atlantis.news.tpi.pl> <gophi.263621@nascom.nasa.gov> <slrnb8pje5.tr.dosiu@dosiu.ds.pg.gda.pl> <gophi.264945@nascom.nasa.gov> <slrnb8qjbk.89.dosiu@dosiu.ds.pg.gda.pl> <gophi.265988@nascom.nasa.gov> <slrnb8tcj0.ekq.dosiu@dosiu.ds.pg.gda.pl> <gophi.268657@nascom.nasa.gov>
NNTP-Posting-Host: dosiu.ds.pg.gda.pl
Mime-Version: 1.0
X-Trace: korweta.task.gda.pl 1049605987 28250 213.192.74.40 (6 Apr 2003 05:13:07 GMT)
X-Complaints-To: ab...@news.task.gda.pl
NNTP-Posting-Date: Sun, 6 Apr 2003 05:13:07 +0000 (UTC)
User-Agent: slrn/0.9.7.4 (Linux)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit