PDA

View Full Version : Cron job error



gocool
22nd December 2008, 05:57 PM
Hi.....friends.......I tried to play a file scheduled as a cron jobs.......but it says the following error.....can some decode it and tell what is the problem............




From gokul@localhost.localdomain Mon Dec 22 12:14:02 2008
Return-Path: <gokul@localhost.localdomain>
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by localhost.localdomain (8.14.1/8.14.1) with ESMTP id mBM6i2IG025668
for <gokul@localhost.localdomain>; Mon, 22 Dec 2008 12:14:02 +0530
Received: (from gokul@localhost)
by localhost.localdomain (8.14.1/8.14.1/Submit) id mBM6i1YR025667;
Mon, 22 Dec 2008 12:14:01 +0530
Message-Id: <200812220644.mBM6i1YR025667@localhost.localdomain>
From: root@localhost.localdomain (Cron Daemon)
To: gokul@localhost.localdomain
Subject: Cron <gokul@localhost> realplay /media/BACKUP/Yuvraj/02 Track 2.mp3
Date: Mon, 22 Dec 2008 12:14:01 0530 (IST)
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/gokul>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=gokul>
X-Cron-Env: <USER=gokul>


** ERROR **: Unable to open display
aborting...
/usr/bin/realplay: line 57: 25666 Aborted $HELIX_LIBS/realplay.bin "$@"

weitjong
22nd December 2008, 07:20 PM
If you intend to play a music in the background then why do you use realplayer because it needs an X screen to display the GUI for the player itself. Install command-line mp3 player like "mpg321" if you have not done so. Then change your command in cron to something like:


/usr/bin/mpg321 -q /media/BACKUP/Yuvraj/02\ Track\ 2.mp3