#!/bin/rc # runcron # hack to run cron on a terminal (not an auth server) # get script name to exclude from process list sn=`{basename $0} # check if run without previous cleaning up (no cron processes but present lock file) cpc=`{ps | grep cron | grep -v $sn | wc -l | awk '{print $1}'} if (test $cpc -eq '0') { rm /cron/lock rfork # there should be only one auth/cron }