Home >Backend Development >PHP Tutorial >Problem with crontab executing php, crontab executing php_PHP tutorial

Problem with crontab executing php, crontab executing php_PHP tutorial

WBOY
WBOYOriginal
2016-07-12 08:51:24980browse

The problem with crontab executing php, crontab executing php

In Linux, we often have to write scheduled tasks, and generally we use crontab. Regarding crontab, you can refer to the following document:

http://www.cnblogs.com/peida/archive/2013/01/08/2850483.html

It needs to be made clear that when executing php files, you must use fully qualified names.

For example:

cd /var/www/html/lws/conf &&/root/php-5.0/bin/php index.php

If you write

php index.php

is a common problem. Both commands and scripts must use fully qualified names.

Not just php, many others also have this problem.

Absolute paths should also be used instead of relative paths in files called internally in php scripts.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1130665.htmlTechArticleThe problem with crontab executing php, crontab executing php. Under Linux, we often have to write scheduled tasks, which we generally use. crontab. Regarding crontab, you can refer to the following document: http://...
Statement:
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