LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-23-2007, 11:30 PM   #1
loplayers
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Rep: Reputation: 0
How to run file every 1 mintues??


i have a file abc.sh
i want linux to run this file every 1 minutes?
so does it about linux services or shell script programming?
 
Old 10-23-2007, 11:39 PM   #2
yongitz
Member
 
Registered: Nov 2005
Location: Davao City, Philippines
Distribution: RHEL, CentOS, Ubuntu, Mint
Posts: 139

Rep: Reputation: 20
Hi! If you want to run your script every minute then edit your crontab file add something like the code below:


Code:
* * * * * /path/to/abc.sh
This line executes your script every minute of every hour of every day of every month.

Last edited by yongitz; 10-23-2007 at 11:42 PM.
 
Old 10-23-2007, 11:40 PM   #3
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
cron is the mechanism for scheduling programs to run on a schedule.

Most general purpose Linux distros have a cron system installed. Each user who is authorised to use cron has their own "crontab". This can be edited from the command line using the crontab command. The format of the crontab needs to be understood to edit it in this way.

If you don't want to spend the time to learn the crontab format, you can install and use kcron to edit your crontab using a GUI, although this interface only permits you to select something to run every 5 minutes.

You should be aware that cron jobs run with a restricted environment - that is not all the environment variables which are set in your normal interactive shell will be set. This may affect the programs you run.

For more information, see the manual pages crontab(1) and crontab(5). The number in brackets is the manual section. To view a page in a specific section you use a command like this in the terminal:
Code:
man 5 crontab
The page in section 5 documents the file format, the page in section 1 documents the command which edits the file.
 
Old 10-23-2007, 11:41 PM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
For some more detailed information and examples, see this link.
 
  


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
how do i run a file Geminias Linux - Newbie 11 01-02-2006 08:01 AM
run a file tyranus Debian 4 09-07-2005 04:36 AM
How do I run a ¨.run¨ file? Jube Linux - Newbie 4 07-03-2005 11:12 PM
how do I run a file? kotoisin Fedora 3 12-08-2004 11:15 AM
how to run file *.run pixelV Linux - Newbie 1 03-10-2003 09:01 AM


All times are GMT -5. The time now is 07:07 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration