Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Ubuntu This forum is for the discussion of Ubuntu Linux.


  Search this Thread
Old 12-08-2010, 05:04 PM   #1
Registered: Dec 2007
Location: SE Texaas
Distribution: Ubuntu, Mint, Fedora
Posts: 163

Rep: Reputation: 24
Crontab Script Not Running

*/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
Registered: Nov 2010
Distribution: Debian Lenny
Posts: 136
Blog Entries: 1

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

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
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:

Kind regards
Old 12-09-2010, 03:51 AM   #4
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,577
Blog Entries: 31

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
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
Registered: Dec 2007
Location: SE Texaas
Distribution: Ubuntu, Mint, Fedora
Posts: 163

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


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 / openSUSE 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 > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 06:16 AM.

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