[news.software.b] Cnews batch times

dlr@daver.UU.NET (Dave Rand) (10/15/89)

Is there an easy way, under C news, to control the time that
batching is done for certain sites? Under B news, of course,
one simply scheduled a sendbatch sitname at at certain time.
Under C news, I'm not sure...

Thanks for any help!

-- 
Dave Rand
{pyramid|hoptoad|sun|vsi1}!daver!dlr	Internet: dlr@daver.uu.net

henry@utzoo.uucp (Henry Spencer) (10/15/89)

In article <1989Oct14.175920.14722@daver.UU.NET> dlr@daver.UU.NET (Dave Rand) writes:
>Is there an easy way, under C news, to control the time that
>batching is done for certain sites? Under B news, of course,
>one simply scheduled a sendbatch sitname at at certain time...

C News "sendbatches" optionally takes site names as arguments, in which case
only those sites are looked at.	

This mechanism isn't perfect, because it doesn't offer any easy way to say
something like "batch for everybody *except* uunet".  However, a shell file
or two built on top of sendbatches can do that or anything else you want to
do.  I decided that was a better approach than me trying to anticipate all
the oddball requirements of unusual sites.
-- 
A bit of tolerance is worth a  |     Henry Spencer at U of Toronto Zoology
megabyte of flaming.           | uunet!attcan!utzoo!henry henry@zoo.toronto.edu

allbery@NCoast.ORG (Brandon S. Allbery) (10/20/89)

As quoted from <1989Oct14.175920.14722@daver.UU.NET> by dlr@daver.UU.NET (Dave Rand):
+---------------
| Is there an easy way, under C news, to control the time that
| batching is done for certain sites? Under B news, of course,
| one simply scheduled a sendbatch sitname at at certain time.
| Under C news, I'm not sure...
+---------------

The above technique can still be used under C news, just change the single
sendbatches call to a sendbatches for each site at the proper time(s).

Alternatively, use the fact that "sendbatches" is a shell script.  Viz.,

	# Run through them.
	for sys in $syses
	do
		# SPECIAL:  DO NOT BATCH FOR WEBB-STILES DURING WORKING HOURS!
		if test "x$sys" = "xhal9000"; then
			set -- `date +'%w %H'`
			case "$1" in
			0|6)	;;
			*)	case "$2" in
				0[0-6])	;;
				1[7-9])	;;
				2*)	;;
				*)	continue ;;	# skip batching
				esac
				;;
			esac
		fi
		# End SPECIAL
		# Move into his directory, include it in search path.
		here=$NEWSARTS/out.going/$sys

(This assumes a System V-ish "date" command.  I believe a PD version is
available out of the archives for Berzerk systems.)

++Brandon
-- 
Brandon S. Allbery, moderator of comp.sources.misc	     allbery@NCoast.ORG
uunet!hal.cwru.edu!ncoast!allbery ncoast!allbery@hal.cwru.edu bsa@telotech.uucp
161-7070 (MCI), ALLBERY (Delphi), B.ALLBERY (GEnie), comp-sources-misc@backbone
[comp.sources.misc-related mail should go ONLY to comp-sources-misc@<backbone>]
*Third party vote-collection service: send mail to allbery@uunet.uu.net (ONLY)*