On 07/07/10 01:29, Denys Vlasenko wrote:
On Tuesday 06 July 2010 00:07, [email protected] wrote:
On 07/05/10 21:09, Loïc Grenié wrote:
00,15,30,45 * * * * env DELAY=16 gnuplot test.gnu

     should solve your environment problem. As for the "cron not starting"
    I don't know.

          Hope this helps,

                Loïc


Thanks Loïc,  that's certainly what I was needing .

I'd tried  DELAY=16 as would work in a shell since cron claims to run
things in the default shell. Seems there's more to it than that.

Ok, I admit I was wrong. I confused cron with inetd.
cron indeed runs programs using:

/bin/sh -c 'commands'

and thus "source FILE" thing should work, if you use it like this,
for example:

00,15,30,45 * * * * source FILE; command

(As an aside, it's better to use ". FILE" since "source FILE"
is a bashism).

Where is that syntax documented. I'd refered to vixiecron man pages
installed on my development machine and it says environment variables
"can be set" but does not specify the need to a special syntax or use of
a "crond command" which seems to be what you are doing here.

Environment variables can be set like this:

00,15,30,45 * * * * VAR=VAL cmd

or this

00,15,30,45 * * * * export VAR=VAL; cmd1; cmd2

in other words, using methods you'd use ib shell scripts.

Also what is the time lag on crond rereading the crontabs files ?

one hour max. "crontad -e" triggers reread sooner by creating cron.update
file.

Std crond reads every time and so no special action is needed after
updating a crontab. This does not seem to be the case with BB crond.

Yes, bbox cron does not check every crontab every minute.
Only every hour.

Where is this fully documented? The doc on the site is very brief .



crond

    crond -fbS -l N -d N -L LOGFILE -c DIR

            -f      Foreground
            -b      Background (default)
            -S      Log to syslog (default)
            -l      Set log level. 0 is the most verbose, default 8
            -d      Set log level, log to stderr
            -L      Log to file
            -c      Working dir



    crontab [-c DIR] [-u USER] [-ler]|[FILE]

            -c      Crontab directory
            -u      User
            -l      List crontab
            -e      Edit crontab
            -r      Delete crontab
            FILE    Replace crontab by FILE ('-': stdin)


I wasted a lot of time thinking things were not working in crontab because it was never getting read. Significant differences in behaviour should be documented.

That the installed binary is minimialist is the whole point of BB , however that logic does not extend to the doc.

Thanks.


Indeed console output now shows I am getting both the "env DELAY=16 "
crontab and the original without a delay which is now commented out with
a #.

This could be a bug. Please describe in more detail.

It seems it has read in the new line but not dropped the old one that is
not longer in crontabs.

Is this expected behaviour?

No.


_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to