[Linux-Biella] Cron e Applicazioni X

Federico Pistono fppain a gmail.com
Ven 30 Dic 2005 13:53:05 CET


Ciao.

95 - 13:48:11]-[ven dic 30]-[~/dati/tmp ]
[Pain@[Pain] crontab -e
#m       h      dom     mon     dow     command
48      13      *       *       *       /usr/local/bin/alarm
crontab: installing new crontab

ok, adesso il problema:

[Pain@[Pain] mail
Mail version 8.1.2 01/15/2001.  Type ? for help.
"/var/mail/pain": 1 message 1 new
>N  1 root a localhost.lo  Fri Dec 30 13:48   21/813   Cron <pain a Pain> /usr/local
&
Message 1:
>From pain a localhost.localdomain Fri Dec 30 13:48:03 2005
Envelope-to: pain a localhost.localdomain
Delivery-date: Fri, 30 Dec 2005 13:48:03 +0100
From: root a localhost.localdomain (Cron Daemon)
To: pain a localhost.localdomain
Subject: Cron <pain a Pain> /usr/local/bin/alarm
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/pain>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=pain>
Date: Fri, 30 Dec 2005 13:48:02 +0100

/usr/bin/X11/xterm Xt error: Can't open display:
/usr/bin/X11/xterm:  DISPLAY is not set

Ok, definiamola. Googlando mi dice di metterla nel crontab.

78 - 13:32:44]-[ven dic 30]-[/etc ]
[root@[Pain] vi /etc/crontab
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file.
# This file also has a username field, that none of the other crontabs do.

SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:
DISPLAY=:0

# m h dom mon dow user  command
17 *    * * *   root    run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || run-parts --report /etc/cro
n.daily
47 6    * * 7   root    test -x /usr/sbin/anacron || run-parts --report /etc/cro
n.weekly
52 6    1 * *   root    test -x /usr/sbin/anacron || run-parts --report /etc/cro
n.monthly
#

Dovrebbe piacergli, no?

80 - 13:52:14]-[ven dic 30]-[/etc ]
[root@[Pain] /etc/init.d/cron restart
Restarting periodic command scheduler: cron.

Ma di nuovo stesso errore di prima, ovviamente modifcando di quei
due/tre minuti necessari a fare il test.

Che fare?




--
  Federico Pistono
  Department of Computer Science - Verona, Italy
  My website ::::::::::::::::: http://www.federicopistono.org
  My personal website :::: http://pain.altervista.org
  Ex-College Website ::::: http://pain.altervista.org/flatnukeuwcad/
  Linux Registered User :: #340392
   "Though I walk through the valley of the shadow of death,
    I will fear no evil: for thou art with me;
    thy rod and thy staff they comfort me."



Maggiori informazioni sulla lista Linux