Date: 1 Nov 2003 00:28:50 -0000 From: David Thiel <lx@redundancy.redundancy.org> To: FreeBSD-gnats-submit@FreeBSD.org Cc: sergei@FreeBSD.org Subject: ports/58789: new port: sysutils/runwhen Message-ID: <20031101002850.89211.qmail@redundancy.redundancy.org> Resent-Message-ID: <200311010030.hA10ULZt009761@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 58789 >Category: ports >Synopsis: new port: sysutils/runwhen >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Oct 31 16:30:20 PST 2003 >Closed-Date: >Last-Modified: >Originator: David Thiel >Release: FreeBSD 4.8-STABLE i386 >Organization: >Environment: System: FreeBSD redundancy.redundancy.org 4.8-STABLE FreeBSD 4.8-STABLE #13: Mon Aug 4 22:05:05 PDT 2003 lx@redundancy.redundancy.org:/usr/obj/usr/src/sys/REDUNDANCY i386 >Description: Utilities for running commands at a particular time, without requiring a daemon. >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # runwhen # runwhen/files # runwhen/files/patch-compile # runwhen/files/patch-host_compile.sh # runwhen/Makefile # runwhen/distinfo # runwhen/pkg-descr # runwhen/pkg-plist # echo c - runwhen mkdir -p runwhen > /dev/null 2>&1 echo c - runwhen/files mkdir -p runwhen/files > /dev/null 2>&1 echo x - runwhen/files/patch-compile sed 's/^X//' >runwhen/files/patch-compile << 'END-of-runwhen/files/patch-compile' X--- package/compile Thu Oct 30 20:56:44 2003 X+++ package/compile.new Fri Oct 31 16:07:38 2003 X@@ -1426,7 +1426,10 @@ X X make_37() { X echo && echo_ Making compile/host/skalibs && X- ln -s "$depend_skalibs" compile/move/skalibs X+ mkdir compile/move/skalibs && X+ ln -s "$depend_skalibs/include/skalibs" compile/move/skalibs/include && X+ ln -s "$depend_skalibs/lib/skalibs" compile/move/skalibs/library X+ X } X find_sums_37() { X rm -f compile/tmpdir/sums && END-of-runwhen/files/patch-compile echo x - runwhen/files/patch-host_compile.sh sed 's/^X//' >runwhen/files/patch-host_compile.sh << 'END-of-runwhen/files/patch-host_compile.sh' X--- conf-compile/host_compile.sh.orig Fri Oct 31 15:53:38 2003 X+++ conf-compile/host_compile.sh Fri Oct 31 15:54:22 2003 X@@ -5,6 +5,6 @@ X # directives; make sure to include them. X X compile_host() { X- gcc -O2 ${1+"$@"} -c "$input" -o "$output" \ X+ %%CC%% %%CFLAGS%% ${1+"$@"} -c "$input" -o "$output" \ X -Wall -W -Wpointer-arith -Wcast-align -Wwrite-strings X } END-of-runwhen/files/patch-host_compile.sh echo x - runwhen/Makefile sed 's/^X//' >runwhen/Makefile << 'END-of-runwhen/Makefile' X# New ports collection makefile for: runwhen X# Date created: 2003-10-31 X# Whom: David Thiel <lx@redundancy.redundancy.org> X# X# $FreeBSD$ X# X XPORTNAME= runwhen XPORTVERSION= 2003.10.31 XCATEGORIES= sysutils XMASTER_SITES= http://multivac.cwru.edu/${PORTNAME}/releases/ X XMAINTAINER= lx@redundancy.redundancy.org XCOMMENT= A set of utilities for running commands at particular times X XBUILD_DEPENDS= ${LOCALBASE}/include/skalibs:${PORTSDIR}/devel/skalibs X XUSE_BZIP2=YES XWRKSRC= ${WRKDIR}/admin/${DISTNAME} XALL_TARGET= default X XDOCS= src/CHANGES src/TODO package/README X Xdo-configure: X ${ECHO_CMD} ${PREFIX} > ${WRKSRC}/conf-compile/package_home X ${ECHO_CMD} ${LOCALBASE} > ${WRKSRC}/conf-compile/depend_skalibs X @${MV} ${WRKSRC}/conf-compile/host_compile.sh ${WRKSRC}/conf-compile/host_compile.sh.in X @${SED} -e 's!%%CFLAGS%%!${CFLAGS}!' \ X -e 's!%%CC%%!${CC}!' \ X ${WRKSRC}/conf-compile/host_compile.sh.in > ${WRKSRC}/conf-compile/host_compile.sh X Xdo-build: X cd ${WRKSRC} && package/compile X Xdo-install: X ${INSTALL_PROGRAM} ${WRKSRC}/command/* ${PREFIX}/bin X.if !defined(NOPORTDOCS) X @${MKDIR} ${DOCSDIR} X cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR} X.endif X X.include <bsd.port.mk> END-of-runwhen/Makefile echo x - runwhen/distinfo sed 's/^X//' >runwhen/distinfo << 'END-of-runwhen/distinfo' XMD5 (runwhen-2003.10.31.tar.bz2) = 9553d896befbec0fec417131dee56053 END-of-runwhen/distinfo echo x - runwhen/pkg-descr sed 's/^X//' >runwhen/pkg-descr << 'END-of-runwhen/pkg-descr' XThe biggest difference between runwhen and other schedulers is that Xrunwhen doesn't have a single daemon overseeing multiple jobs. The Xrunwhen tools essentially act as a glorified sleep command. For each job Xyou want to schedule, you run a command (typically scripted) that: X X* figures out how long to sleep until the time when the job is supposed to run, X* goes to sleep for that amount of time, and X* executes the command you give on the command line. X XIf a job is to run periodically, you'll configure it to run under a Xrespawner such as supervise or init. (You could instead let the job Xitself end by re-executing the command line to reschedule itself, but a Xrespawner would protect against crashes.) One-time jobs can be run in Xthe background from your shell. X XOne program, rw-sleep, does the sleeping. The other tools in the package Xcompute timstamps according to various criteria. You can develop your Xown tools to compute timestamps according to any criteria that may be Xof interest to you, and use those to control the duration of rw-sleep's Xsleep. X XWWW: http://multivac.cwru.edu/runwhen/ END-of-runwhen/pkg-descr echo x - runwhen/pkg-plist sed 's/^X//' >runwhen/pkg-plist << 'END-of-runwhen/pkg-plist' Xbin/caldelay Xbin/delayrun Xbin/maxinterval Xbin/mininterval Xbin/rw-add Xbin/rw-match Xbin/rw-max Xbin/rw-min Xbin/rw-sleep Xbin/rw-sub Xbin/rw-touch Xshare/doc/runwhen/CHANGES Xshare/doc/runwhen/README Xshare/doc/runwhen/TODO X@dirrm share/doc/runwhen END-of-runwhen/pkg-plist exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031101002850.89211.qmail>