Perirun, executes files daily, weekly or monthly

+++ Anzeige +++

card4students
Studenten aufgepaßt! Nur mit der card4students gibt es attraktive Rabatte und das ultimative Kreditkartendoppel (VISA und Eurocard 1 Jahr kostenlos) in einem.
Jetzt infromieren und bestellen!

Webmaster?
Haben Sie eine eigene Homepage?

Verdienen Sie Geld mit einem Link von Ihrer Homepage oder in Ihrer E-Mail. E-Commerce Unternehmen zahlen Ihnen hohe Provisionen, wenn Käufer über Ihren Link kamen.

- renomierte Betreiber wie: STRATO, Quelle, Karstadt, Vodafone D2, Esprit, Mexx, Conrad, Lycos, Klingel, Wenz, DATA BECKER, beautynet, getgo, Stage Holding, travelchannel u.v.a.
zanox

+++ Anzeige Ende +++

disk.png perirun-0.1.9.tar.gz (~ 16 KB)

Description

perirun searchs in directories which can be specified in user_config.pl for executable files and starts a new subshell to execute these files either daily, weekly or monthly. It waits on the process to finish and starts the next.

The amount of directories to be searched is limited only by gprolog and the machine where perirun is running on. Gprolog has still no garbage collector implemented. This may change soon.

perirun skips over files which are not executable, so you can easily chmod them. (man chmod)
An example entry in user_config.pl:

per_dir(daily, '/etc/periodic/daily/').

Dedicated to people not familiar with prolog at all:
Please enclose the pathnames in single qoutes.

Version

Revision 1.9, last modified: 2002-07-19

Install

To compile, you need GNU Prolog. Please have a look at http://www.gnu.org/software/prolog/prolog.html or http://gnu-prolog.inria.fr/ or, because perirun is actually written on and for FreeBSD, install gprolog via /usr/ports/lang/gprolog. Nevertheless perirun should compile and run on all unices where gprolog compiles. Simply run:

gplc --min-size p.pl -o perirun
(The now included Makefile does nothing else, it's only shorter to type make .)

Copy the executable perirun to /usr/local/sbin

If running FreeBSD: Copy perirun.sh to /usr/local/etc/rc.d/ and chmod it executable. If not and you don't have any clue, drop me a mail.

Edit /etc/crontab
See the example crontab.freebsd.example file.

Changes

Revision 1.9: time_stamp/1 added

History

Because I don't run a server at home, which is working 7 days a week, I was somewhat dissatisfied with the cron jobs running at a specific time. I remembered how a Linux Distributor takes simple home users cron jobs into account, I decided to rewrite it by myself.

The reason why I wrote it in Prolog are simple: I like this language, I think this language should be more spreaded, it lacks useful, somewhat really doing examples and I like to improve my practice in writing Prolog programs.

The reason why I use FreeBSD is even more simple: I used Linux for a long time and when Kernel starts the 2.4 release, I saw somewhat like linux-2.4.x-pre-a-b-c everyday at freshmeat. I didn't wanted to play kernel updating any more with lot of pondering and reading if the new Kernel intended for security issues or to make it more stable. Or if this new Kernel 2.X.X-pre-patch-from-xy is only released for supporting new hardware. I simply want a stable system to work with, where these things are more easier to follow.

LICENSE

Published under the terms of the GPL (GNU Public License), there are no warranties at all. A copy of the GPL is shipped with perirun-0.1.9.tar.gz. Maybe perirun is also useful for somebody else.

BUGS

Let me know: mailto.png sax at noart.de

TODO

Don't know. I'm satisfied. But let me know if you miss something really important for you. But never ask for a GUI ;-).

[Top] up.gif

mailto.png webmaster Zuletzt geändert: Freitag, den 23. Mai 03, 15:19:29h