Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 May 2003 12:58:10 +0200
From:      Antoine Jacoutot <ajacoutot@lphp.org>
To:        Matthew Seaman <m.seaman@infracaninophile.co.uk>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: backslash in crontab
Message-ID:  <200305311258.14004.ajacoutot@lphp.org>
In-Reply-To: <20030531100436.GA75487@happy-idiot-talk.infracaninophile.co.uk>
References:  <200305311049.38120.ajacoutot@lphp.org> <20030531100436.GA75487@happy-idiot-talk.infracaninophile.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday 31 May 2003 12:04, Matthew Seaman wrote:
> Yes -- the entry in the crontab file has to be all on one line, as
> you've discovered.  If you absolutely have to reformat things, then
> generally the way to go is to create a shell script containing your
> complex command and run that out of cron instead:
>
> crontab entry:
>
>     0 2 * * * myscript
>
>     % cat <<E_O_SCRIPT > myscript
>     #!/bin/sh
>
>     command A && \
>         command B && \
>         command C
>     E_O_SCRIPT

Thanks :)

Antoine
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQE+2IrFY3Hnhkr+5cQRAqx4AJ46FZYC+hc2P5CeiSiPQ3UkpXQfFgCffUwa
gICDT683Oz+1i3G6RajG3X8=
=oc4D
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305311258.14004.ajacoutot>