OpenWrt Join crontab Boot default run

Source: Internet
Author: User

"Reprint Please specify Source: Changuo column http://blog.csdn.net/qianguozheng/article/details/37666829"


The OPENWRT system has already joined the Crond by default, simply not configuring the default configuration parameters, which causes the service to not come up.


Main steps:

1. Change the startup script/etc/ini.d/cron

/etc/rc.d/s50cron links for/etc/ini.d/cron

<span style= "FONT-SIZE:18PX;" >#!/bin/sh/etc/rc.common# Copyright (C) 2006-2011 Openwrt.orgstart=50service_use_pid=1start () {loglevel=$ (uci_ Get "[Email Protected][0].cronloglevel") [-Z "$ (ls/etc/crontabs/)]" && exit 1mkdir-p/var/spool/cronln-s/etc/ Crontabs/var/spool/cron/2>/dev/nullservice_start/usr/sbin/crond-c/etc/crontabs-l ${loglevel:-5}}stop () { Service_stop/usr/sbin/crond}</span>


2. Join the default startup program/etc/crontabs/root

File name is: username

Content format: number is minute. The following is a timed run script

<span style= "FONT-SIZE:18PX;"  >*/1 * * * */etc/init.d/disconnuser &*/1 * * * */etc/init.d/repuserstatus &*/6 * * * */etc/init.d/sysupgrade &*/1 * * * */etc/init.d/checkroute</span>


References:

"Http://blog.sina.com.cn/s/blog_79c0eb8701014co3.html"

"Http://martybugs.net/wireless/openwrt/cron.cgi"

OpenWrt Join crontab Boot default run

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.