LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-11-2004, 04:30 PM   #1
perry
Member
 
Registered: Sep 2003
Location: USA & Canada
Distribution: Slackware 12.0
Posts: 978

Rep: Reputation: 30
Quick cron question.... HHHHEEEEELLLLPPPP!!!


here's my /etc/crontab

Code:
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/java/jre/bin:
MAILTO=root
HOME=/

# run-parts
01 * * * * root nice -n 19 run-parts /etc/cron.hourly
02 4 * * * root nice -n 19 run-parts /etc/cron.daily
22 4 * * 0 root nice -n 19 run-parts /etc/cron.weekly
42 4 1 * * root nice -n 19 run-parts /etc/cron.monthly
here's my /etc/spool/cron/perry

Code:
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.3376 installed on Sun Jul 11 17:18:01 2004)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
*/1 * * * * nice -n 19 run-parts /home/perry/cron
here's the contents of /home/perry/cron

Code:
chgimage
chgimage.jar
here's the contents of chgimage

Code:
#!/bin/sh
cp /mnt/maxtor/Network/nice/nice01/satellite_image.jpg /mnt/maxtor/Network/nice/nice01/image.jpg
java -jar chgimage.jar /mnt/maxtor/Network/nice/nice01 /home/perry/cron/chgimage
it's a cool idea, to have a java program run every minute, pick an image and write it out where gkrellm-kam can read it, then re-write the chgimage script itself so that next time there's a new update....

so close yet so far away, everything works but the damn cron....

and i wonder if run-parts has a big problem with the jar file, i guess i can try and move that out of the way....

any lesson in the blatent obvious would be greatly appreciated...

- perry

Last edited by perry; 07-11-2004 at 05:07 PM.
 
Old 07-11-2004, 04:36 PM   #2
perry
Member
 
Registered: Sep 2003
Location: USA & Canada
Distribution: Slackware 12.0
Posts: 978

Original Poster
Rep: Reputation: 30
i suppose the writing of the script file while one process might be reading it could be a problem, but you would think that it would have to be completely read before that becomes a problem....

in any event, i suspect i just cannot figure out how to specify a cron job to run every minute....

- perry
 
Old 07-11-2004, 04:47 PM   #3
perry
Member
 
Registered: Sep 2003
Location: USA & Canada
Distribution: Slackware 12.0
Posts: 978

Original Poster
Rep: Reputation: 30
this fellow said to something i thought for sure made sense origionally, but i'm not seeing any action:

Quote:
un 'crontab -e' and see what happens. In Linux you'd get a text editor to add cronjobs with, but if OSX works differently then I can't help you.

Your cron job would look like this:
Code:
* * * * * ping 255.255.255.255
That would run it every minute as long as your computer is turned on. I don't think you can run it every 10 seconds with the usual cron, but maybe an alternative cron will be able to.
_________________
shakin
- perry
 
Old 07-11-2004, 05:00 PM   #4
perry
Member
 
Registered: Sep 2003
Location: USA & Canada
Distribution: Slackware 12.0
Posts: 978

Original Poster
Rep: Reputation: 30
i put a test script in the cron folder to make sure cron was working, then i resolved it's targetting parameters

aka:

Code:
HOME=/home/perry/cron
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/java/jre/bin:
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.3376 installed on Sun Jul 11 17:18:01 2004)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
* * * * * nice -n 19 run-parts /home/perry/cron
seems to work, really really nice....!

- perry
 
  


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
quick cron reminder needed jedimastermopar Linux - General 1 05-26-2005 04:09 PM
cron Question djoseph74 Linux - General 5 09-02-2004 08:24 PM
samba smb.config question (quick question) TheDOGG Linux - Networking 1 03-02-2004 07:19 AM
Quick Question about cron job andy18 Linux - General 2 08-11-2003 04:16 PM
Cron Question.... bfloeagle Linux - General 3 03-13-2001 10:15 PM

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

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