Fedora Linux Support Community & Resources Center
  #1  
Old 6th November 2009, 11:28 AM
Adunaic Offline
Registered User
 
Join Date: Mar 2009
Location: Lancaster, UK
Posts: 922
linuxfedorafirefox
cron jobs

Hi,

I wanted to use cron to play a media file at a certain time (i.e. use it as an alarm clock). However it seems to do nothing. I am not sure what I am doing wrong and would like some help. The contents of my crontab is:

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# For details see man 4 crontabs

# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * command to be executed
5 11 * * * env DISPLAY=:0.0 /usr/bin/totem /path_to_file
Reply With Quote
  #2  
Old 6th November 2009, 01:15 PM
confident Offline
Registered User
 
Join Date: Sep 2009
Posts: 14
linuxfedorafirefox
Instead of editing the file /etc/crontab, it's easier to run the command crontab directly.
First of all see the current crontab jobs and remove them all.
To list all crontab jobs :
Quote:
crontab -l
and for removing them all
Quote:
crontab -r
Now type in the command line
Quote:
crontab -e
and type your cron job, it will be like
Quote:
5 11 * * * env DISPLAY=:0.0 /usr/bin/totem /path_to_file
Reply With Quote
  #3  
Old 6th November 2009, 01:27 PM
Adunaic Offline
Registered User
 
Join Date: Mar 2009
Location: Lancaster, UK
Posts: 922
linuxfedorafirefox
That works. Thanks
Reply With Quote
Reply

Tags
cron

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cron Jobs webmastadj Using Fedora 7 26th June 2008 03:37 AM
cron jobs bigmacbb63 Using Fedora 1 22nd August 2007 12:48 PM
cron jobs - help joshua197 Using Fedora 2 27th March 2007 02:09 PM
Cron Jobs engrkhalid Using Fedora 3 30th August 2005 07:21 PM


Current GMT-time: 20:55 (Thursday, 20-11-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Wadsworth - New Smyrna Beach Instagram Photos - Rancho Cordova Travel Photos on Instagram