LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 04-30-2009, 10:02 AM   #1
JoshMiller
LQ Newbie
 
Registered: Apr 2009
Posts: 10

Rep: Reputation: 0
Problem with Scheduled Task


I am having a bit of a problem with a scheduled task. I've got a script I want to run once an hour. I've set it up to run with gnome-schedule and gotten it to run. The problem is that it runs 4 times every hour.

Any ideas would be appreciated. If I runt he script manually it only executes once so it's not a problem there.
 
Old 04-30-2009, 11:37 AM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Could you post the entry in cron that gnome schedule created for you?

---------------------
Steve Stites
 
Old 04-30-2009, 02:23 PM   #3
JoshMiller
LQ Newbie
 
Registered: Apr 2009
Posts: 10

Original Poster
Rep: Reputation: 0
[QUOTE=jailbait;3525966]Could you post the entry in cron that gnome schedule created for you?

Where would I find that at exactly? there isn't anything under etc/cron.hourly, which is where I understand these sorts of files go.
 
Old 04-30-2009, 03:38 PM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Try the command
Code:
crontab -l
it will list your current crontab entries. In gnome-schedule you can see the time fields in the Advanced tab of the scheduled task dialog.
 
Old 04-30-2009, 04:04 PM   #5
JoshMiller
LQ Newbie
 
Registered: Apr 2009
Posts: 10

Original Poster
Rep: Reputation: 0
Here's what I get

josh@Selphie:~$ crontab -l
0 * * * * bash /home/josh/scripts/post_uptime >/dev/null 2>&1 #JOB_ID_1
josh@Selphie:~$
 
Old 04-30-2009, 04:09 PM   #6
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
It is correct. Why do you think it runs 4 times per hour? Does it produce something strange?
 
Old 04-30-2009, 08:56 PM   #7
JoshMiller
LQ Newbie
 
Registered: Apr 2009
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colucix View Post
It is correct. Why do you think it runs 4 times per hour? Does it produce something strange?
The script makes a twitter post and 4 tweets all show up at once as seen here. http://twitter.com/selphiebot
 
Old 04-30-2009, 09:03 PM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
How about posting the script code as well. As colucix says, timing looks fine, unless you've got other cronjobs with the same code. Check all the system crontabs, and all crontabs for all users (/var/spool/cron probably).
 
  


Reply



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
Task bar no longer shows task Richard Rahl Linux - Newbie 3 04-12-2010 09:39 AM
IT asset and scheduled task management software Galorin Linux - Enterprise 4 02-28-2008 05:16 AM
Remote scheduled task barn63 Fedora 2 10-22-2007 11:36 AM
scheduled task trebek Linux - Software 4 09-24-2006 03:37 AM
Scheduled task in linux? Dakkar Linux - Newbie 4 12-30-2003 08:54 AM

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

All times are GMT -5. The time now is 04:25 PM.

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