interpretation of cron options
Page 1 of 111 Replies - 454 Views - Last Post: 22 March 2012 - 07:45 AM
#1
interpretation of cron options
Posted 08 March 2012 - 04:48 AM
isn't it supposed to mean 6pm every mon-fri? how come i get over 2000 files after running it for about 2 months?
Replies To: interpretation of cron options
#2
Re: interpretation of cron options
Posted 08 March 2012 - 05:05 AM
min(0-59) hour(0-23) Day of (1 - 31) Month (1- 12) Day of the week (( 0 - 6)0 = Sunday)
Crontab Example
A line in crontab file like below removes the tmp files from /home/someuser/tmp each day at 6:30 PM.
30 18 * * * rm /home/someuser/tmp/*
This post has been edited by Toadill: 08 March 2012 - 05:05 AM
#3
Re: interpretation of cron options
Posted 08 March 2012 - 05:09 AM
-are my options valid? (* 18 *
* 1-5)
-do they represent what i want? (6pm, mon-fri)
-why do i have 2k+ files after 2 months?
#4
Re: interpretation of cron options
Posted 08 March 2012 - 05:22 AM
min(0-59) hour(0-23) Day of (1 - 31) Month (1- 12) Day of the week
____*___________*__________*_____________________*
This does look correct 6pm monday - friday
yeah 2000 files is a lot, it should only be around 300 in two months that's about 6 files extra a day
This post has been edited by Toadill: 08 March 2012 - 05:28 AM
#5
Re: interpretation of cron options
Posted 08 March 2012 - 05:39 AM
#6
Re: interpretation of cron options
Posted 08 March 2012 - 07:12 AM
#8
Re: interpretation of cron options
Posted 09 March 2012 - 06:43 AM
#9
Re: interpretation of cron options
Posted 11 March 2012 - 04:14 AM
/usr/bin/wget <options> /tmp/outputfile.htm
I find if I don't use fully qualified paths, sometimes my cron jobs don't run properly. I would also enclose the command in quote marks, ie:
"/usr/bin/wget <options> /tmp/outputfile.htm"
#10
Re: interpretation of cron options
Posted 17 March 2012 - 12:26 AM
After removing the -t inf switch and thinking my problems where solved, cron sent me 200 mails just for one day! (it was supposed to be 1). I read through the manual (link in post above) and saw something interesting: the --ignore-length switch. I've set that now and will see what will happen.
Is there any way the problem lies with cron? Does cron send mail once for each time the job runs or something else?
#11
Re: interpretation of cron options
Posted 17 March 2012 - 06:11 PM
#12
Re: interpretation of cron options
Posted 22 March 2012 - 07:45 AM
|
|

New Topic/Question


MultiQuote






|