(resending because I can't spell. :/  Sorry for the noise.)

Hi Pedro,

Pedro Zorzenon Neto wrote:

> After upgrading to squeeze and answering "yes" to install question of
> using dash as default shell for non-interactive users, all my cronjobs
> that use $RANDOM variable to delay some random seconds of running time
> stopped working.

I don't think this functionality belongs in dash.  For example, I
find that the "sleep" command in

> Example of a simple cronjob which runs with a random delay of
> 0 ~ 327 seconds (to prevent network peaks of all the machines):
>
>   */30 * * * * sleep $(($RANDOM/100)) && do_something_network_related

is better written (more portably and more intuitively) as

        sleep $(awk 'BEGIN {srand(); printf "%d\n", rand()*327}')

or

        awk 'BEGIN { srand(); system("sleep " int(rand() * 327)) }'

even though this is a little longer.

On the other hand, I would definitely like a way for users to be able
to easily choose a different shell to be used by cron, so they would
be less at the mercy of the cruel sysadmin.  What do you think?

Thanks for writing,
Jonathan



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to