Results 1 to 3 of 3
Hi I am very new to linux. I want to run a cronjob every 15 minutes that checks a directory for files. If the directory contains more than ten files ...
- 10-13-2010 #1Just Joined!
- Join Date
- Oct 2010
- Posts
- 2
crontab help
Hi I am very new to linux. I want to run a cronjob every 15 minutes that checks a directory for files. If the directory contains more than ten files I want it to send an email to me.
All I have is this...
*/15 * * * * ls -l | wc -l | [filename] | mail -s "This is just a test" [email address]
I would rather not write a bash script. Is there an easier way to do this? I was looking into some commands like find and grep
Could somone show me an example?
Thanks,
LN
- 10-14-2010 #2
That is not as you want but it may be help
HowTo: Add Jobs To cron Under Linux or UNIX?Last edited by ved; 10-14-2010 at 12:25 PM.
Take risks: if you win, you will be happy; if you lose, you will be wise.
New Users : Read This First
- 10-14-2010 #3
what do you mean you don't want to write a bash script? what do you think cronjob does and how it runs? it is basically a shell script, but it can run anything from there


Reply With Quote