Results 1 to 10 of 13
Hey guys, really need help here, wondering if any1 noe how 2 use cron ?...
- 08-23-2007 #1Just Joined!
- Join Date
- Jul 2007
- Posts
- 59
Bash cron update (SOMEBODY SAVE ME)
Hey guys, really need help here, wondering if any1 noe how 2 use cron ?
- 08-23-2007 #2Linux Guru
- Join Date
- Nov 2004
- Posts
- 6,110
Post the problem or question you have in as much detail as you can. Most people will have had experience with cron.
- 08-27-2007 #3Just Joined!
- Join Date
- Jul 2007
- Posts
- 59
hmm...let say i need to extract out words from the website whihc i already did...i need 2 use cron to sent the data, but hw do i write a script using that? also by the way is
shop-t -s -o unounset?
- 08-27-2007 #4Linux Guru
- Join Date
- Nov 2004
- Posts
- 6,110
Cron is the scheduling daemon. If your command can run in one line you can enter it directly with crontab -e. If however your trouble is that you are not sure how to write a script you can check out many tutorials and literature.
You can write a bash script by starting the file withand placing a command on each line. The best place to start in my opinion is The Advanced Bash Scripting Guide. Don't worry it's the guide that's advanced, it does a good job of starting from the start.Code:#!/bin/bash
EDIT - Space in shabang removed.Last edited by bigtomrodney; 10-08-2007 at 10:50 AM.
- 08-28-2007 #5Just Joined!
- Join Date
- Jul 2007
- Posts
- 59
thx a lot but let say if i already done the script how do i execute it?
- 08-31-2007 #6Just Joined!
- Join Date
- Jul 2007
- Posts
- 59
- 08-31-2007 #7
Some of us thoroughly enjoy bash scripting. ....Ar....
(Hey bigtomrodney, do you realize you put a space between "/bin" and "/bash"?)
Once you've created the bash script, make it executable (chmod +x script) and use crontab to tell it to execute. I like to keep a local copy of my crontab file, which I save as ~/text/crontab.txt. After I edit it I execute this command:
crontab ~/text/crontab.txt
The file format is fully documented with man 5 crontab.
Be sure to specify the script's whole path.
My crontab.txt file generally looks something like this:Code:# crontab for Ken Jackson # Time fields: minute, hour, day, month, day-of-week (0 or 7 is Sun) MAILTO=ken 56 6 * * * $HOME/bin/scriptone 58 22 * * * $HOME/bin/scripttwo
- 10-08-2007 #8Just Joined!
- Join Date
- Jul 2007
- Posts
- 59
- 10-08-2007 #9
Default desktop environment for Mandriva is still KDE right? Do it with kcron. It should be in your menu. If not, from the command line:
Code:kdesu kcron
- 10-08-2007 #10Just Joined!
- Join Date
- Jul 2007
- Posts
- 59
Sounds difficult....any easier method like using xmod + ???


Reply With Quote

