Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Can Run Job from Terminal, But Cronning It Fails

  • Subject: Can Run Job from Terminal, But Cronning It Fails
  • From: Roy Schestowitz <newsgroups@xxxxxxxxxxxxxxx>
  • Date: Sun, 17 Jun 2007 07:52:39 +0100
  • Newsgroups: comp.os.linux.misc
  • Organization: Netscape / schestowitz.com
  • User-agent: KNode/0.10.4
Hi,

A couple of years ago (in SuSE), I was able to get a particular cron job to
work. It uses ImageMagick. While I was able to get it to work by running it
from the terminal, cron failed. Someone in this newsgroup advised me to
precede the job with "export DISPLAY=localhost:0.0", which did the trick.
Having changed distributions, however, I am no longer able to get it to
work. In fact "export DISPLAY=localhost:0.0" leads to errors when running
it from the terminal, so it's now commented out.

Here is part of the script which I am able to run successfully from the
terminal:

#!/bin/sh

# export DISPLAY=localhost:0.0
   # set display (to make cron job work)


###################################
# Get current virtual desktop

import -window root ~/public_html/screen-temp.jpeg
   # capture display
mogrify -resize 25% -border 3 ~/public_html/screen-temp.jpeg
   # save to temporary file so as to avoid full-sized
   # image from being public for a second
convert ~/public_html/screen-temp.jpeg  -font Bookman-DemiItalic -pointsize
20 -

[...]

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index