Home > Backend Development > PHP Tutorial > Scheduled tasks (crontab) under Linux

Scheduled tasks (crontab) under Linux

WBOY
Release: 2016-07-29 09:16:06
Original
1098 people have browsed it

If you are an expert, please skip it. . It will make you laugh

This is a tutorial for beginners to apply Linux scheduled tasks. It is relatively simple. If your scheduled tasks are more complex, it is recommended to use shell scripts, etc.

1. Install crontab. I directly use yum install crontab (if you don’t support yum, you can download the installation package and install it)

2. crontab -e will open this scheduled task file.

3. Write the corresponding command in it For example: */1 * * * * /usr/bin/curl 127.0.0.1/app/sundry/test //Execute this url every 1 minute

Execute every five minutes */5 * * * *

Execution every hour 0 * * * *

Execution every day 0 0 * * *

Execution every week 0 0 * * 0

Execution every month 0 0 1 * *

Execution every year 0 0 1 1 *

The specific command execution methods, I will not introduce them one by one here, there are many more


Copyright statement: You can reprint but please indicate the original link, thank you

The above introduces the scheduled tasks (crontab) under Linux, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template