如何在linux中添加cron作业 [英] How to add a cron job in linux

查看:119
本文介绍了如何在linux中添加cron作业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用sphinx进行搜索,我每天都会收到新的查询。
所以我必须每天重新索引sphinx索引。

I am using sphinx for searching and I get new queries everyday. So I have to reindex the sphinx index on daily basis.

如何在linux中设置cron这样做。

How can i set a cron in linux to do so.

推荐答案

a crontab的定义如下:

a crontab is defined like this:

MIN HOUR DOM MON DOW CMD

因此,如果您想每天运行任务,请尝试: p>

so if you want to run a task on a daily basis try:

0 0 * * * /path/to/your/script

每天在0:00触发脚本的启动

that will trigger the launch of your script everyday at 0:00

这篇关于如何在linux中添加cron作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆