LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   crontab (https://www.linuxquestions.org/questions/linux-newbie-8/crontab-387132/)

kwtan 11-27-2005 09:22 PM

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.

michaelk 11-27-2005 09:33 PM

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.

kwtan 11-27-2005 09:43 PM

Get the correct anwser:

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

Thank you michaelk.


All times are GMT -5. The time now is 03:19 AM.