LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-08-2005, 03:42 AM   #1
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
making a crontab


Hi,

I noticed i have /etc/cron.hourly, daily weekly, and monthly. I want to create another cron folder which will execute the commands every minute, but not sure how..

To rephrase, i have 2 commands i'd like to execute every 1 minute.

My first guess is to create /etc/cron.minute, but i'm not sure what to do next..
Thanks.
 
Old 05-08-2005, 04:14 AM   #2
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
You will have to edit root rules wich are the ones that have those directories to run every X time with the command (run as root):
Code:
crontab -e
Once there you'll need to select the frecuency time, you're looking for something like:
Code:
*/1 * * * * /usr/bin/run-parts /etc/cron.minute 1> /dev/null
A mini tutorial can be found here (there are much more, this is a example): http://usertools.plus.net/tutorials/id/1
 
Old 05-08-2005, 07:13 AM   #3
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
Thanks. That did the job.

Yet another thing i can read about and experiment with =)
 
Old 05-08-2005, 08:50 AM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Why run crontab -e as root, you could run your user crontab as well
 
Old 05-08-2005, 09:12 AM   #5
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
Quote:
Originally posted by keefaz
Why run crontab -e as root, you could run your user crontab as well
True, but i'm a 'root' person in my laptop (save it.. i know)
 
Old 05-08-2005, 11:34 PM   #6
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
Quote:
Originally posted by keefaz
Why run crontab -e as root, you could run your user crontab as well
I suggested this because the commands under /etc/cron.daily (and others) are executed as root. As you said, you can program tasks with any user you want.
 
  


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
Crontab reynacho_au Linux - Software 6 12-28-2004 03:09 AM
crontab -e hoover93 Linux - Newbie 2 08-06-2004 04:05 PM
making an entry in crontab through code (perl) akaash Programming 2 05-17-2004 03:36 AM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM
Crontab help vasah20 Linux - General 1 01-09-2003 02:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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