Common traps
Every SA, DBA or ordinary Unix user, used for the first time Crontab has problems. Common errors for running Crontab include the following: 1) A new Cron JOB has been created for testing purposes, and the interval must be more than two minutes, otherwise the JOB will not be dispatched. If you must ignore the two-minute load configuration time difference, you can do so by restarting the Cron Daemon.
2) Things to note when starting the X Window program from Crontab: So either initialize "DISPLAY=:0.0" before the program, or append the parameter after the application --display :0.0
3) The % in must be escaped: \\%. My personal opinion is not to take this parameter in the command line, just write it into the script, and then dispatch the script.
In fact, I think the most common problem with using Crontab is often because the environment variables are wrong. I often see people in the forum asking: Why is my Crontab created and not executing? When I am ready to create a Cron JOB, many people like to run it from the command line, because the environment variable is automatically brought in with the shell. In Crontab, JOB cannot be executed because the correct environment variable is not found. This small problem is like a smallpox, and I remember it after a lesson.
A trick that must be used
After each JOB is executed, the system will automatically send the output to the current system user. Over time, it is very much, and it will even blast the entire system. So it is necessary to perform a redirection process after each JOB command: >/dev/null 2>&1 . The premise is that the commands in the job need to be processed normally, such as appending to a specific log file. Attachment: The format of Crontab is as follows:
* Comma (',') specifies the list value. For example: "1,3,4,7,8"* The horizontal line ('-') specifies the range value as "1-6", for "1,2,3,4,5,6"* The asterisk ('*') stands for all possible values
Linux (open source system seems to be fine) and there is a "/" available. On the Minute field, */15 means every 15 minutes. This feature is not available on commercial Unix, such as AIX.
# Use the hash sign to prefix a comment # +---------------- minute (0 - 59) # |
+------------- hour (0 - 23) # |
|
+---------- day of month (1 - 31) # |
|
|
+------- month (1 - 12) # |
|
|
|
+---- day of week (0 - 7) (Sunday=0 or 7) # |
|
|
|
|
# * * * * * command to be executed
In the existing embedded LINUX system development process, all engineers are tired
What is the boot process for Linux? How to complete the system startup through grub boot? These pro
Regarding the circuit structure, whether it is a linear power supply, a thyristor power supply or
In RHEL/CentOS, it is very convenient to use the setup configuration tool to configure many key conf
Usage shell background regular tasks of
WindowsXP classic failure network failure articles
Introduction to jiffies in the Linux kernel and their effects
Conflicts in Linux and their responses
Explain how to add soft routes in Linux
Qq for linux installation and uninstallation
What should I do if the Win7 system file is damaged?
How to check the patch records installed in the Win8 system?
Those Windows systems run commands large inventory
How to adjust the visual effect of Win7 system
Win8 system boot display Start#ZHS solution
Win8.1 enters the safe mode of the two implementation methods
How to use win10 mail application? How to use
How to reinstall windows7 system