Welcome to the most active Linux Forum on the web.
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, 06:04 PM   #1
Registered: Dec 2007
Posts: 157

Rep: Reputation: 21
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 04:47 PM.
Old 12-08-2010, 06: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, 02:45 AM   #3
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,516

Rep: Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896
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, 04:51 AM   #4
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian except for netbook still on Slackware 13.37 (and I have to support Ubuntu)
Posts: 8,572
Blog Entries: 30

Rep: Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182
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, 04:49 PM   #5
Registered: Dec 2007
Posts: 157

Original Poster
Rep: Reputation: 21
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 07:21 AM
Shell Script not Running from Crontab venkatramanj SUSE / openSUSE 3 01-13-2010 06:15 AM
Running a script with crontab. glore2002 Slackware 3 06-05-2008 09:48 PM
error running script on crontab haora Linux - Newbie 3 03-11-2005 05:02 PM
Shell script running via crontab problem. thetruethugg Linux - Software 13 12-19-2003 09:56 PM

All times are GMT -5. The time now is 02:57 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