LinuxQuestions.org
Visit Jeremy's Blog.
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 01-26-2006, 12:23 AM   #1
spin2cool
LQ Newbie
 
Registered: Aug 2005
Posts: 2

Rep: Reputation: 0
cron job/gdesklets help


Since gdesklets seems to have a pretty bad memory leak, I'd like to have cron kill it and restart it once in a while. I've having trouble with getting cron to launch gdesklets, though.

Say I wanted to do it at 11 after every hour. I stick this in my crontab file to kill gdesklets:

Code:
11 * * * * myusername kill $(pgrep -f gdesklets)
and it works great!

The next line is supposed to restart gdesklets, though, and doesn't seem to work:
Code:
11 * * * * myusername gdesklets
I've also tried substituting "gdesklets restart" and "gdesklets shell" and neither works. If I go to a terminal and type any of these commands in, gdesklets comes up just fine, though.

Any ideas why this isn't working, or how to fix it??
 
Old 01-26-2006, 09:09 PM   #2
dugas
Member
 
Registered: Jul 2004
Location: louisiana
Distribution: fedora 4/kubuntu
Posts: 116

Rep: Reputation: 15
Have you tried putting the full path to gdesklets?
 
Old 01-26-2006, 09:55 PM   #3
spin2cool
LQ Newbie
 
Registered: Aug 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Nope - the path isn't the problem.

It doesn't seem to work with any program that requires a display window (gdesklets, gedit, firefox, etc).

Someone on another forum suggested that it might be a problem with proper access (xauth) or setting a display, but I'm having trouble finding information on either of those in the context of this problem.

Here are the contents of my /etc/crontab file, if it helps:

Code:
SHELL=/bin/bash
PATH=/usr/local/bin:/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/bin/X11:/usr/games

# m h dom mon dow user	command
17 * * * * root    run-parts --report /etc/cron.hourly
25 6 * * * root	test -x /usr/sbin/anacron || run-parts --report /etc/cron.daily
47 6 * * 7 root	test -x /usr/sbin/anacron || run-parts --report /etc/cron.weekly
52 6 1 * * root	test -x /usr/sbin/anacron || run-parts --report /etc/cron.monthly
50 * * * * myusername gdesklets
#
 
  


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
need help with cron job parthcorp1 Linux - General 2 02-01-2005 11:37 AM
CRON Job tommytomato Fedora 12 09-13-2004 12:38 AM
cron job sanjith11 Linux - General 5 07-14-2004 01:06 PM
Cron job rajasekarvr Linux - General 4 05-03-2004 05:35 PM
Cron Job imanahmadi Linux - Newbie 1 07-03-2003 11:39 PM

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

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