LinuxQuestions.org
Visit Jeremy's Blog.
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 11-27-2005, 10:22 PM   #1
kwtan
LQ Newbie
 
Registered: Nov 2005
Posts: 14

Rep: Reputation: 0
crontab


I want to automate a process every day from 1 to 3 AM, every 2 minutes using Crontab.

But I don't have any clue how to do it?

Is the script below correct?

2 1,2,3 * * * rm /home/someuser/tmp/*

I dont't think it is correct.

Thank you.

Last edited by kwtan; 11-27-2005 at 10:27 PM.
 
Old 11-27-2005, 10:33 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,060

Rep: Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760
Quote:
2 1,2,3 * * * rm /home/someuser/tmp/*
Every two minutes would be
*/2 1,2,3 * * * rm /home/someuser/tmp/*

See man crontab for additional info.
 
Old 11-27-2005, 10:43 PM   #3
kwtan
LQ Newbie
 
Registered: Nov 2005
Posts: 14

Original Poster
Rep: Reputation: 0
Get the correct anwser:

*/2 1-3 * * * rm /home/someuser/tmp/*

Thank you michaelk.
 
  


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 x2??? killahsmurf Slackware 2 05-24-2005 11:53 PM
Crontab wormraper Debian 4 05-15-2005 02:01 AM
How to use crontab ? Dakkar Linux - Newbie 2 01-22-2004 11:49 AM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 01:35 PM
HELP!! crontab karleong Linux - General 9 07-12-2003 11:54 AM


All times are GMT -5. The time now is 12:41 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration