1. Start from running
You can modify the RC. Local file to easily process the self-running startup. This file is located under the/etc directory.
By default, RC. Local is an empty foot. You only need to modify it. Note whether the processes on which the command is executed in this file are running. I tried again because I wanted to start dia when I started it. I tried it many times but failed. I think the interface process is not started yet. My lab script is
Echo "Hello. Rc. Local"> Home/shanfeng/rc. Local: The experiment is successful.
There is also the rc *. d directory under the/etc directory. These directories are placed in many soft links of scripts under/etc/init. d/. The operating system selects to run the scripts based on different running levels. You can also modify them to start from running.
2. Scheduled task
A simple processing method is introduced.
To use cron to process scheduled tasks, you must first ensure that the cron operation has been run. If cron is installed
. Under normal circumstances, cron has been started and runs automatically, if not.
/Etc/init. d/cron start
Use crontab to schedule scheduled tasks
Crontab [-u user] {-L |-r |-e}
-L: displays tasks.
-E: edit a task.
-R: Clear the task
Task format:
Minute Hour Week month year Operation Command
Eg:
1.*14 *** echo "Look Me">/home/shanfeng/test indicates that the task runs once every day.
2. 0-59/2 *** echo "Look Me">/tmp/test indicates that the task runs every two minutes.
3. * *** echo "Look Me">/tmp/test indicates that the task runs once at and.
*: Represents any-: represents the interval./: represents the frequency,: represents the enumeration