LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 12-08-2010, 05:04 PM   #1
th1bill
Member
 
Registered: Dec 2007
Posts: 149

Rep: Reputation: 21
Crontab Script Not Running


Quote:
*/2 * * * * /home/willis/changer

# .---------------- 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
I opened "crontab -e" in the Terminal and in nano I copied and pasted the first line of this copied script, leaving all the notated lines out. Each time I manually run changer by clicking and selecting "Run" it changes my Wallpaper but this does not happen automatically no matter how many times I reboot.

Does anyone know what "Stupid" did to mess up a perfectly good plan?

Any help will be greatly appreciated.

Last edited by th1bill; 12-10-2010 at 03:47 PM.
 
Old 12-08-2010, 05:26 PM   #2
barriehie
Member
 
Registered: Nov 2010
Distribution: Debian Lenny
Posts: 136
Blog Entries: 1

Rep: Reputation: 23
I think you're supposed to have:
Code:
[when to run] user command
 
Old 12-09-2010, 01:45 AM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,511

Rep: Reputation: 884Reputation: 884Reputation: 884Reputation: 884Reputation: 884Reputation: 884Reputation: 884
First, cron has a limited PATH, so make sure to give the whole path to all commands and files.
Take a look in the logfiles for errors.
Cron will sent a mail to the user, if there are problems.
Perhaps you can post the script.

Or try wallpapoz for gnome:
http://wallpapoz.akbarhome.com/

Kind regards
 
Old 12-09-2010, 03:51 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,551
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
cron does not know about your desktop's X server.

If you know cron is running the script (echo running > /tmp/${0##*/}.$$ would tell), and you have only one X server running, you could try adding export DISPLAY='localhost:0.0' to your script.

Alternatively you could add a delayed loop to your script and launch it from the desktop's autostart facility instead of using cron -- its a neater solution than all those cron jobs anyway.
 
Old 12-10-2010, 03:49 PM   #5
th1bill
Member
 
Registered: Dec 2007
Posts: 149

Original Poster
Rep: Reputation: 21
I have marked the string Solved because I found Wally and I can start it from the GUI Menue.
 
  


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 not running script sunlinux Linux - Newbie 5 05-18-2010 06:21 AM
Shell Script not Running from Crontab venkatramanj Suse/Novell 3 01-13-2010 05:15 AM
Running a script with crontab. glore2002 Slackware 3 06-05-2008 08:48 PM
error running script on crontab haora Linux - Newbie 3 03-11-2005 04:02 PM
Shell script running via crontab problem. thetruethugg Linux - Software 13 12-19-2003 08:56 PM


All times are GMT -5. The time now is 03:38 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration