Register a domain and help support LQ
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 11-27-2005, 09:22 PM   #1
LQ Newbie
Registered: Nov 2005
Posts: 14

Rep: Reputation: 0

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 09:27 PM.
Old 11-27-2005, 09:33 PM   #2
Registered: Aug 2002
Posts: 13,152

Rep: Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064
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, 09:43 PM   #3
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.


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

All times are GMT -5. The time now is 07:16 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration