[clug] running fortune from cron.

Mark Harrison m.harrison at anu.edu.au
Wed Sep 10 11:14:44 EST 2003


Hi,
The environment might not be the same inside cron? Maybe try absolute
paths like '/usr/games/fortune'

On Wed, 2003-09-10 at 11:10, John Griffiths wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> G'day all.
> 
> I'm almost certainly not doing this the most efficient way, but by way
> of a learning exercise I've written a shell script (my first) to
> generate fortunes, use enscript to convert them into postscript and then
> using convert to turn them into png files, which in turn are displayed
> by a "slideshow" screensaver.
> 
> The script runs fine when i execute it myself,
> 
> but when I put it in the crontab it can't find fortune.
> 
> (Debian woody machine)
> 
> the script is as follows:
> 
> #!/bin/bash
> fortune > /home/john/sceen.txt
> enscript -B -f Times-Roman20 /home/john/sceen.txt -p sceen.ps
> convert -negate /home/john/sceen.ps /home/john/sceen/sceen.png
> 
> The crontab is:
> 
> 01 * * * * nohup /home/john/sceen.sh &
> 
> and the error messgae cron is mailling me looks like this:
> 
> /home/john/sceen.sh: fortune: command not found
> 
> Any help would be appreciated.
> 
> Regs,
> 
> John
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQE/XnoUoE0noESYVCkRAtnKAJ4ykF6rfy8+EwX9cefCU3SCz2jz6wCfXkPc
> U48gMVZWl//9fQQYFyhX8Kg=
> =Mpjr
> -----END PGP SIGNATURE-----




More information about the linux mailing list