LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-27-2004, 04:25 PM   #1
PierrePau
LQ Newbie
 
Registered: May 2004
Posts: 7

Rep: Reputation: 0
Problem with crontab


Hi,

i would like to run a script to wake me up using crontab. When I type crontab -l I have:

[cleo@localhost CXX]$ crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.8609 installed on Sun Jun 27 23:16:41 2004)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
16 23 * * * /home/cleo/alarm

where /home/cleo/alarm is an executable script:
-rwxrwxr-x 1 cleo cleo 74 Jun 27 23:22 alarm

where alarm contains:

#!/bin/sh
gmplayer -cache 512 -v mms://streampower.belgacom.be/stubruhigh

This does not launch the script at 23h16. Can someone tell me why?

Thanks!

Pierre
 
Old 06-27-2004, 05:16 PM   #2
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 65
Does /var/log/cron or messages or syslog have anything interesting to say? Is crond running, never know...

Cheers,

Finegan
 
Old 06-27-2004, 05:20 PM   #3
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Does that script run if you just punch in ./alarm


Just to double check things, here are my notes...

chmod +x /home/test
export EDITOR=vi
crontab /etc/crontab
crontab -e

I like to use a rapid setting so I can test it right away like every minute or two. For example...

* * * * * /home/test

Then don't forget to start the crond
chkconfig --level 35 crond on
 
Old 06-28-2004, 02:34 PM   #4
PierrePau
LQ Newbie
 
Registered: May 2004
Posts: 7

Original Poster
Rep: Reputation: 0
OK, I found what was wrong. I looked in /var/spool/mail/ :

From cleo@localhost.localdomain Mon Jun 28 21:25:00 2004
Return-Path: <cleo@localhost.localdomain>
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by localhost.localdomain (8.12.10/8.12.10) with ESMTP id i5SJP0ZK009661
for <cleo@localhost.localdomain>; Mon, 28 Jun 2004 21:25:00 +0200
Received: (from cleo@localhost)
by localhost.localdomain (8.12.10/8.12.10/Submit) id i5SJP0P0009659
for cleo; Mon, 28 Jun 2004 21:25:00 +0200
Date: Mon, 28 Jun 2004 21:25:00 +0200
Message-Id: <200406281925.i5SJP0P0009659@localhost.localdomain>
From: root@localhost.localdomain (Cron Daemon)
To: cleo@localhost.localdomain
Subject: Cron <cleo@localhost> /home/cleo/alarm
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/cleo>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=cleo>

/home/cleo/alarm: line 2: gmplayer: command not found


When adding the right path for gmplayer with crontab -e it worked!

Thanks for your help!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Crontab Problem smus Linux - Newbie 4 12-10-2005 08:52 AM
crontab problem provo1234 Linux - General 3 01-21-2005 11:20 AM
crontab problem BlackRabbit Linux - General 9 06-17-2004 07:38 AM
problem with crontab juanb Linux - Newbie 2 12-16-2003 04:54 AM
crontab problem TomTheNewbie Slackware 1 07-09-2003 07:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration