Linux Start Restart and Stop The Cron or Crond Service

How do I start, restart and stop the cron service under Linux / UNIX / BSD like operating systems?

Cron (crond) daemon or service is use to execute scheduled commands or scripts. cron wakes up every minute, examining all stored crontabs, checking each command to see if it should be run in the current minute.

If you are using Redhat (RHEL)/Fedora Core/Cent OS Linux use the following commands.

Task: Start cron service

To start the cron service, use:
# /etc/init.d/crond start

Task: Stop cron service

To stop the cron service, use:
# /etc/init.d/crond stop

Task: Restart cron service

To restart the cron service, use:
# /etc/init.d/crond restart

If you are using Debian or Ubuntu Linux the following commands.

Task: Debian Start cron service

To start the cron service, use:
# /etc/init.d/cron start
OR
$ sudo /etc/init.d/cron start

Task: Debian Stop cron service

To stop the cron service, use:
# /etc/init.d/cron stop
OR
$ sudo /etc/init.d/cron stop

Task: Debian Restart cron service

To restart the cron service, use:
# /etc/init.d/cron restart
OR
$ sudo /etc/init.d/cron restart

Task : Start the cron service at boot time

It is recommended that you start the service at boot time so that job can run w/o problems.

If you are using Redhat (RHEL)/Fedora Core/Cent OS Linux use the following commands to ensure that the service remains enabled after a reboot:
# chkconfig crond on
You can use a text based GUI tool called ntsysv to enable crond service:
# ntsysv

If you are using Debian or Ubuntu Linux use the following commands to ensure that the service remains enabled after a reboot:
# rcconf
OR
$ sudo rcconf
You can use command line tool update-rc.d:
# update-rc.d cron defaults
OR
$ sudo update-rc.d cron defaults


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值