Date: Mon, 14 Jun 2010 13:13:40 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: freebsd-questions@freebsd.org Subject: Re: Simulate CRON Message-ID: <4C161CF4.8090604@infracaninophile.co.uk> In-Reply-To: <19478.6326.762000.959609@jerusalem.litteratus.org> References: <BLU0-SMTP551C6AAD193A252C3010E393DC0@phx.gbl> <19478.6326.762000.959609@jerusalem.litteratus.org>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 14/06/2010 12:55:34, Robert Huff wrote:
>
> Carmel writes:
>
>> > > I saw a posting here months ago regarding a way to simulate running
>> > > a script under CRON. I wrote it down and now cannot find it.
>> > > Googling has not proved very useful either. I just cannot remember
>> > > the program name.
>>
>> > Are you looking for a cron syntax check? If yes, then this site
>> > should be of some help:
>>
>> No, sorry. There was a command or program, I forgot which, that
>> would allow a user to run a program under another environment,
>> similar to the environment that a script under CRON would be
>> running under.
>
> Are you possibly talking about a jail?
Try:
env -i USER=$USER HOME=$HOME LOGNAME=$LOGNAME \
PATH=/usr/bin:/bin SHELL=/bin/sh PWD=$HOME your-script-name
Cheers,
Matthew
- --
Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matthew@infracaninophile.co.uk Kent, CT11 9PW
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkwWHPQACgkQ8Mjk52CukIx5fQCaAlvxOIEvdG96J1+lSB0UCQlX
NqsAnjFA4gG6eJtPiHlIBcfdRzjxaSAB
=AwPN
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C161CF4.8090604>
