Home > Backend Development > PHP Tutorial > centos - Linux crontab, what is the difference between executing .sh files and .php files

centos - Linux crontab, what is the difference between executing .sh files and .php files

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-08-04 09:20:47
Original
1120 people have browsed it

Like the title, I saw a .sh file was executed in the crontab of a project, and then I searched for the corresponding php file in .sh. It feels a bit redundant. Is that so?
It can’t be a problem that affects performance

Reply content:

Like the title, I saw a .sh file was executed in the crontab of a project, and then I searched for the corresponding php file in .sh. It feels a bit redundant. Is that so?
It can’t be a problem that affects performance

They are completely different things. .sh is a shell command
.php is a PHP file

You execute the php file in the shell command. If it is very simple to execute, you might as well use php -f xxx.php
If you need to judge. Assign value. Cycle. . Of course you have to use the shell to execute it.

A .sh file can execute multiple php files according to their functions to facilitate maintenance and management.

Related labels:
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template