经常用,但是经常忘记,基本的格式能记得,但是详细的或者复杂点的格式总会忘记或者拿不准,不知道是不是年纪大了记忆力下降,干脆整理出来今后方便查看。
基本格式 :
* * * * * command
分 时 日 月 周 命令
第1列表示分钟1~59 每分钟用*或者 */1表示
第2列表示小时1~23(0表示0点)
第3列表示日期1~31
第4列表示月份1~12
第5列标识号星期0~6(0表示星期天)
第6列要运行的命令
crontab文件的一些例子:
30 21 * * * /usr/local/etc/rc.d/lighttpd restart
上面的例子表示每晚的21:30重启lighttpd 。
45 4 1,10,22 * * /usr/local/etc/rc.d/lighttpd restart
上面的例子表示每月1、10、22日的4 : 45重启lighttpd 。
10 1 * * 6,0 /usr/local/etc/rc.d/lighttpd restart
上面的例子表示每周六、周日的1 : 10重启lighttpd 。
0,30 18-23 * * * /usr/local/etc/rc.d/lighttpd restart
上面的例子表示在每天18 : 00至23 : 00之间每隔30分钟重启lighttpd 。
0 23 * * 6 /usr/local/etc/rc.d/lighttpd restart
上面的例子表示每星期六的11 : 00 pm重启lighttpd 。
* */1 * * * /usr/local/etc/rc.d/lighttpd restart
每一小时重启lighttpd
* 23-7/1 * * * /usr/local/etc/rc.d/lighttpd restart
晚上11点到早上7点之间,每隔一小时重启lighttpd
0 11 4 * mon-wed /usr/local/etc/rc.d/lighttpd restart
每月的4号与每周一到周三的11点重启lighttpd
0 4 1 jan * /usr/local/etc/rc.d/lighttpd restart
一月一号的4点重启lighttpd
呵呵,为什么不把常用的,但记不住的东西打印出来,放在手边呢?其实也不是年龄大了,很多人都无法记住这些东西.
[Comment ID #13083 Will Be Quoted Here]
嗯,言之有理,我之前就是整理了一些BSD系统各种应急处理方法,打印了放在笔记本包包里面,还真是用到了好几次。
可是为什么要重启apache呢? 哈
我习惯用的时候再来找,但是前提是知道有这么个东西
[Comment ID #13177 Will Be Quoted Here]
哈哈,这个只是个例子而已了:)实际并不重启,我经常一个月也不用重启一次,现在服务器用的webServer是Nginx,不是Apache,你可以telnet后GET看看header,嘿嘿
经常来你的blog看看.你是个挺有意思的人.如果能整理一套应急的方案,都可以奉献出来,给大家一块享用了。不过如果自己没有接触过,这些方案也就白白放在那里了.
good,最近我也在用,每天定时统计排行榜
这个是重启apache的?
30 21 * * * /usr/local/etc/rc.d/lighttpd restart
这不是重启lighttpd的吗?
apache的我记得这样吧
/sbin/service httpd restart
[Comment ID #18643 Will Be Quoted Here]
哈哈,这个只是个书写的范例罢了,文章的主要目的不是为了记录这个,而是crontab的格式 🙂
0,1 * * * * /usr/L0uiS/Bishop/guard/AutoStartKFXGuard
我这样写是每1分钟都执行一下这个(AutoStartKFXGuard)脚本吗??请回答!!!
thx
[Comment ID #18849 Will Be Quoted Here]
每小时的整点和每小时的第一分钟执行一次,不是每分钟,如果每分钟可以写成 * * * * * cmd 或者 */1 * * * * cmd 不过第二种方式在solaris下不生效,仅Linux下有效。
* * * * * cmd /usr/L0uiS/Bishop/guard/AutoStartKFXGuard
是这样写吗??
cmd是执行的意思???
对,cmd就是你要执行的命令
我能电话联系您吗??
我非常着急!
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
#AutoStartKFXGuard
* * * * * /usr/L0uiS/bishop/AutoStartKFXGuard
~
这里面应该怎么写?????????谢谢你
你在吗????
我想开机掉用AutoStartKFXGuard这个脚本
该如何写呢??????
老问题,还是没有成功!
谢谢你的耐心回答。。。
你在吗????
我想每分钟掉用AutoStartKFXGuard这个脚本
该如何写呢??????
老问题,还是没有成功!
谢谢你的耐心回答。。。
不是开机,是每分钟。不好意思
执行下列命令:
# crontab -e
加入这样一行
* * * * * /usr/L0uiS/bishop/AutoStartKFXGuard
保存退出 (:wq)
完成
不错,多谢。
zhxaixpp@126.com
正在找cron的资料,谢谢
Exclusive: Melissa Gorga and Kathy Wakile Will Not air max shoes Be Spending Thanksgiving With Teresa Giudice!
sacoche louis vuitton Saskatchewan multiple sclerosis patients hoping to take part in a clinical trial of a controversial treatment may soon get a call from the ministry of health.
air yeezy 2012 Air Canada flights were set to stop this week after the airline said it would lock out its pilots and the machinists union said it would strike in the midst of the key spring holiday season.
many thanks to the author. It is incomprehensible to me now, but in general, the usefulness and significance is overwhelming. Thanks again and good luck!!!
To set the tone, Grace relied on the wisecracking snappy patter — “she gives as good as she gets,” Pearce says — between Emilie and Pearce’s agent.
http://www.lovemichaelkors.com/ michael kors handbags
Nice post, good to know that this topic is being covered also in this web site. Excellently written article, if only all blogger offered the same level of content as you.
Thank you for an additional fantastic blog. michael kors storesWhere else might one get that sort of information written in such a perfect way?michael kors outlet I actually have a presentation that i am presently working on, and that i are looking for such information instead!michael kors handbags
I am extremely impressed with your writing skills and also with the design of your blog. michael kors factoryIs this a paid theme or did you edit it yourself? Either way keep up the great quality writing, it is rare to see a nice website such as this one these days!
It’s an awesome paragraph in favor of all the online viewers;
they will get advantage from it I am sure.
You should take part in a contest for one of the
greatest sites on the internet. I most certainly
will recommend this website!
Pretty sectgion of content. I just stumbled upon your site
and inn accession capital to assert that I acquire in fact enjoyed account your blog posts.
Anyway I will be subscribing to your augment
and even I achievement you access consistently
rapidly.
Just want to say your article is as astounding. The clearness on your submit is
simply excellent and that i could suppose you’re a professional on this
subject. Fine together with your permission allow me to grab your
RSS feed to keep up to date with drawing close post.
Thank you 1,000,000 and please keep up the enjoyable work.
Quality content is the important to be a focus
for the visitors to pay a visit the web page, that’s what this web page is providing.
I don’t know whether it’s just me or if everybody else experiencing issues with your website.
It looks like some of the written text in your posts are running off the screen. Can someone else please
comment and let me know if this is happening to them as well?
This could be a issue with my browser because I’ve had this happen before.
Appreciate it
Very energetic blog, I liked that bit. Will there be a part 2?
Just wish to say your article is as surprising.
The clarity in your post is simply excellent and i could assume you are an expert
on this subject. Fine with your permission allow me
to grab your RSS feed to keep updated with forthcoming post.
Thanks a million and please carry on the rewarding work.
Thanks for your marvelous posting! I truly enjoyed reading it, you
happen to be a great author. I will make sure to bookmark your blog and definitely will come
back from now on. I want to encourage you to ultimately continue your great writing, have a nice holiday weekend!
My relatives every time say that I am killing
my time here at web, except I know I am getting familiarity all the time by reading such pleasant articles.
Good day! I could have sworn I’ve been to this website before but after going through
a few of the posts I realized it’s new to me. Nonetheless, I’m certainly
happy I stumbled upon it and I’ll be bookmarking it and checking back
frequently!
If some one desires expert view about blogging afterward i propose him/her
to visit this webpage, Keep up the fastidious work.
Currently it sounds like BlogEngine is the best blogging platform available right now.
(from what I’ve read) Is that what you’re using on your blog?
An interesting discussion is worth comment. I believe that you should write more about
this subject, it may not be a taboo subject but typically people don’t
speak about these topics. To the next! All the best!!
Usually I do not learn article on blogs, but I would like
to say that this write-up very forced me to take a look at and
do so! Your writing taste has been amazed me. Thank you, very nice post.
I really like your blog.. very nice colors & theme. Did
you create this website yourself or did you hire someone to
do it for you? Plz answer back as I’m looking to design my own blog and would like to know where u got this
from. thank you
Woah! I’m really digging the template/theme of this blog.
It’s simple, yet effective. A lot of times it’s very hard to get
that “perfect balance” between user friendliness and appearance.
I must say you’ve done a superb job with this.
Also, the blog loads super quick for me on Safari. Outstanding Blog!
bookmarked!!, I really like your site!
An outstanding share! I’ve just forwarded this onto a coworker
who was doing a little research on this. And he in fact ordered me
lunch due to the fact that I found it for him…
lol. So let me reword this…. Thank YOU for the meal!!
But yeah, thanks for spending some time to discuss this issue here on your
site.
I’m really enjoying the design and layout of your site.
It’s a very easy on the eyes which makes it much more pleasant for me to come here and visit more often.
Did you hire out a designer to create your theme?
Superb work!
Thanks for sharing your thoughts about minecraft.
Regards
Hello there! This article could not be written any
better! Going through this post reminds me of my previous roommate!
He always kept talking about this. I’ll forward this article to him.
Fairly certain he’s going to have a very good read. Thanks for sharing!
I pay a visit day-to-day a few sites and blogs to read articles
or reviews, however this website presents quality based posts.
Do you have a spam problem on this blog; I also am a blogger, and I was wanting to know your situation; we have developed some nice methods and we are looking to trade strategies with other folks, be sure
to shoot me an email if interested.
You need to be a part of a contest for one of the most useful blogs online.
I’m going to highly recommend this blog!
If you want to grow your know-how only keep visiting this web page and be updated with the hottest news posted here.
Keep in mind that the starting heap measurement
may be the same for several at the beginning of the contest.
First of all I would like to say superb blog!
I had a quick question in which I’d like to ask if you do not mind.
I was interested to find out how you center yourself and clear your mind prior to writing.
I’ve had a difficult time clearing my mind in getting my thoughts out there.
I do take pleasure in writing but it just seems like
the first 10 to 15 minutes are usually lost simply just trying to
figure out how to begin. Any recommendations or hints? Thanks!
Hi it’s me, I am also visiting this website daily, this website is actually fastidious and
the users are truly sharing pleasant thoughts.
Have you ever thought about including a little bit more than just your articles?
I mean, what you say is valuable and everything. However just imagine if you
added some great images or video clips to give your posts more, “pop”!
Your content is excellent but with images and video clips,
this website could undeniably be one of the greatest in its niche.
Superb blog!
Hi there! This is kind of off topic but I need some guidance from an established blog.
Is it hard to set up your own blog? I’m not very techincal but I can figure things out pretty quick.
I’m thinking about making my own but I’m not sure where to begin. Do you have any tips or
suggestions? Many thanks
Hi there it’s me, I am also visiting this web site regularly, this website is in fact
good and the people are really sharing good thoughts.
I am regular visitor, how are you everybody? This post posted at
this web page is genuinely pleasant.
Have you ever thought about including a little bit more than just your articles?
I mean, what you say is valuable and everything.
However imagine if you added some great graphics or videos to give your posts more,
“pop”! Your content is excellent but with images and video clips, this website could definitely
be one of the best in its niche. Fantastic blog!
Thanks for your personal marvelous posting! I quite enjoyed
reading it, you can be a great author.I will be sure to bookmark your
blog and may come back someday. I want to encourage
yourself to continue your great writing, have a nice afternoon!
Heya! I just wanted to ask if you ever have any issues with hackers?
My last blog (wordpress) was hacked and I ended up losing
months of hard work due to no data backup. Do you have any methods to prevent
hackers?
You really make it seem so easy with your presentation but
I find this topic to be actually something that I think I would never understand.
It seems too complex and very broad for me. I’m looking forward for your next post, I will try to get the hang
of it!
I blog often and I genuinely appreciate your content. This great article has really peaked my interest.
I will bookmark your website and keep checking for new information about once per week.
I subscribed to your Feed too.
Hi, I think your blog might be having browser compatibility
issues. When I look at your website in Chrome, it looks fine but
when opening in Internet Explorer, it has some overlapping.
I just wanted to give you a quick heads up!
Other then that, very good blog!
I’m extremely pleased to uncover this great site. I need
to to thank you for your time just for this wonderful
read!! I definitely really liked every bit of it and I have you book-marked to check out new stuff on your website.
I got this web site from my pal who informed me about this website
and at the moment this time I am browsing this web site and reading very
informative articles at this place.
Saved as a favorite, I really like your website!
Having read this I believed it was very informative.
I appreciate you finding the time and energy to put this information together.
I once again find myself spending a significant amount
of time both reading and posting comments. But so what, it was still
worthwhile!
I love your blog.. very nice colors & theme. Did you create this website
yourself or did you hire someone to do it for you?
Plz answer back as I’m looking to create my own blog and would like to
find out where u got this from. many thanks
These are actually enormous ideas in regarding blogging.
You have touched some pleasant points here.
Any way keep up wrinting.
Its like you read my mind! You seem to know so much about
this, like you wrote the book in it or something. I think that you could do with a few pics to drive the message
home a little bit, but other than that, this is great blog.
A great read. I’ll certainly be back.
Undeniably believe that which you said. Your favorite justification appeared to
be on the internet the easiest thing to be aware of. I say to you, I certainly get irked while people think about
worries that they just don’t know about. You managed to hit
the nail upon the top as well as defined out the
whole thing without having side effect , people
can take a signal. Will probably be back to get more.
Thanks
Howdy! I could have sworn I’ve been to this web
site before but after going through some of the articles I realized it’s new to me.
Nonetheless, I’m definitely happy I found it and I’ll be bookmarking it and checking back often!
Hello! Do you know if they make any plugins to assist with SEO?
I’m trying to get my blog to rank for some targeted keywords but
I’m not seeing very good success. If you know of any please share.
Many thanks!
Does your blog have a contact page? I’m having a tough time locating it but, I’d like to shoot you an email.
I’ve got some ideas for your blog you might be interested in hearing.
Either way, great website and I look forward to seeing it expand over time.
Hi there would you mind stating which blog platform you’re working with?
I’m looking to start my own blog in the near future but I’m having a tough time selecting between BlogEngine/Wordpress/B2evolution and Drupal.
The reason I ask is because your design and style seems different then most blogs
and I’m looking for something unique.
P.S Sorry for being off-topic but I had to ask!
We stumbled over here coming from a different page and thought I may as well check things out.
I like what I see so i am just following you.
Look forward to checking out your web page repeatedly.
I was very pleased to find this website. I
wanted to thank you for your time for this particularly fantastic read!!
I definitely appreciated every bit of it and i also have you
book marked to see new information on your web site.
We are a group of volunteers and opening
a new scheme in our community. Your website provided us with valuable information to work on. You have done
a formidable job and our whole community will be thankful to you.
If some one wishes to be updated with most recent technologies then he must be go to see this site and be
up to date daily.
Hi, I check your blog daily. Your writing style is awesome, keep it
up!
These are in fact enormous ideas in regarding blogging.
You have touched some pleasant factors here. Any way keep up wrinting.
I’m not that much of a online reader to be honest but your
sites really nice, keep it up! I’ll go ahead and bookmark your website to
come back later. Cheers
Hey there I am so glad I found your web site, I really
found you by accident, while I was browsing on Bing for something else, Regardless
I am here now and would just like to say thanks a lot
for a fantastic post and a all round exciting blog (I also love the theme/design), I don’t have time to browse it all at the moment but I have book-marked it and also added
in your RSS feeds, so when I have time I will be back to read a
great deal more, Please do keep up the superb job.
Very nice post. I just stumbled upon your weblog and wanted to say that I’ve truly enjoyed browsing your blog posts.
After all I will be subscribing to your rss feed and I hope you write again very soon!
Hey there this is kinda of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML.
I’m starting a blog soon but have no coding experience so
I wanted to get guidance from someone with experience. Any help would be greatly appreciated!
Do you have a spam issue on this site; I also am a blogger,
and I was wondering your situation; many of us have created some nice
methods and we are looking to exchange methods with others,
be sure to shoot me an e-mail if interested.
You’ve made some decent points there. I checked on the net for more info about the issue and found most people will go along with your views on this website.
What’s Going down i’m new to this, I stumbled upon this I have discovered It positively helpful and it has aided me out loads.
I hope to give a contribution & help different users like its helped me.
Good job.
What’s up to all, how is all, I think every one is getting more from this website, and your views are fastidious in favor of new
viewers.
This site certainly has all of the information I needed about this subject and didn’t know who to ask.
natalielise pof
Hi there colleagues, how is the whole thing, and what you wish for to say about this piece of writing,
in my view its actually awesome designed for me.hot free porn
whoah this weblog is wonderful i like reading your posts.
Stay up the great work! You realize, lots of persons are searching round for
this info, you could help them greatly.
Good posts. Cheers.
canadian discount pharmacy
london drugs canada
canada drugs online
best 10 online canadian pharmacies
ed meds online without doctor prescription – https://www.canadianpharmacy-ltd.com/
best 10 online canadian pharmacies hing 6442241
Wow many of beneficial info!
buy viagra online
buy uk viagra – https://genericviagrarcp.com/
what is better viagra or cialis
48e3c34
Currently it sounds like Movable Type is the top blogging platform available right now.
(from what I’ve read) Is that what you are using on your blog?
I love your blog.. very nice colors & theme. Did you create this website yourself or did you hire someone
to do it for you? Plz respond as I’m looking to design my own blog and would like
to know where u got this from. many thanks
I used to be recommended this web site by way of my cousin.
I am now not certain whether or not this put up is written via him as no one else know such designated about my trouble.
You are amazing! Thank you!
Do you mind if I quote a couple of your articles as
long as I provide credit and sources back to your blog? My blog is in the exact same niche
as yours and my visitors would certainly benefit from a lot of the information you present here.
Please let me know if this okay with you. Cheers!
I was suggested this web site through my cousin. I am
no longer positive whether or not this submit is written through him as nobody
else recognize such distinctive about my problem. You’re incredible!
Thanks!
I think that everything published made a bunch of sense.
However, think about this, what if you were to create a awesome post title?
I mean, I don’t want to tell you how to run your blog, but what
if you added a title that makes people want more?
I mean crontab 的格式备忘 | 李俊麟的平凡生活 is
kinda plain. You ought to glance at Yahoo’s front page and
note how they write post headlines to get viewers to click.
You might add a related video or a related picture or two to get people interested about what
you’ve written. In my opinion, it would make your blog a little bit more interesting.
Excellent web site you have got here.. It’s hard to find good quality
writing like yours these days. I truly appreciate people
like you! Take care!!
Hello there, just became alert to your blog through Google, and found that it’s truly informative.
I’m going to watch out for brussels. I will appreciate if you continue this in future.
Lots of people will be benefited from your writing. Cheers!
What a information of un-ambiguity and preserveness of valuable
familiarity concerning unpredicted emotions.
When someone writes an article he/she keeps the plan of a user in his/her mind that how a user can know it.
So that’s why this article is amazing. Thanks!
This is really interesting, You are a very professional blogger.
I have joined your rss feed and look forward to seeking extra of your wonderful post.
Additionally, I have shared your site in my social networks
This design is steller! You obviously know how to keep a reader entertained.
Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!)
Wonderful job. I really loved what you had to say, and more than that, how you presented
it. Too cool!
Hey! I just wanted to ask if you ever have any trouble with hackers?
My last blog (wordpress) was hacked and I ended up losing
months of hard work due to no data backup. Do you have any methods to protect against hackers?
I was suggested this blog by my cousin. I am not sure whether this post is
written by him as nobody else know such detailed about my difficulty.
You’re amazing! Thanks!
Hello, i believe that i noticed you visited my site
thus i came to go back the prefer?.I’m trying to find issues to enhance my site!I guess its good enough to make use of a
few of your ideas!!
This text is invaluable. When can I find out more?
Good day! Do you know if they make any plugins to
safeguard against hackers? I’m kinda paranoid about losing everything I’ve worked hard on. Any tips?
Magnificent beat ! I would like to apprentice while you amend your web site, how could i subscribe for a blog web site?
The account aided me a acceptable deal. I had been a little bit acquainted of this your broadcast provided bright clear idea
You could definitely see your enthusiasm within the work you write.
The arena hopes for even more passionate writers such as you who aren’t
afraid to mention how they believe. At all times follow your heart.
What’s up to every body, it’s my first visit of this blog; this website contains
amazing and genuinely excellent data designed for visitors.
Thank you for sharing your info. I truly appreciate your efforts and I will be waiting for your
further post thanks once again.
Thanks for one’s marvelous posting! I actually enjoyed reading it, you’re a great author.I will always bookmark your blog and may come back in the future.
I want to encourage you to continue your great posts, have a nice weekend!
Hi, I do think this is an excellent blog. I stumbledupon it 😉 I may revisit once again since i have book marked
it. Money and freedom is the best way to change, may
you be rich and continue to help others.
whoah this weblog is excellent i love studying your posts.
Keep up the great work! You know, many people are looking around for this info, you could aid them greatly.
Just desire to say your article is as astonishing. The clarity to your post is simply spectacular and that i can think you’re
a professional in this subject. Well together with your permission let me to clutch your RSS feed to stay updated with coming near near post.
Thanks a million and please carry on the gratifying work.
Hey I am so grateful I found your site, I really found you
by mistake, while I was looking on Google for something else, Nonetheless I am here now and would
just like to say kudos for a tremendous post and a all round entertaining blog (I also love the theme/design), I don’t have
time to read it all at the minute but I have book-marked it and also added in your RSS
feeds, so when I have time I will be back to read a
lot more, Please do keep up the awesome work.
Hey there! This is kind of off topic but I need some advice from an established blog.
Is it difficult to set up your own blog? I’m
not very techincal but I can figure things out pretty quick.
I’m thinking about creating my own but I’m not sure where to start.
Do you have any ideas or suggestions? Appreciate it
No matter if some one searches for his required thing, therefore he/she needs to be available that in detail,
therefore that thing is maintained over here.