Laravel Cronjob :: 状态:404 未找到 X-Powered-By:PHP/7.3.20 内容类型:text/html; charset=UTF-8 未指定输入文件
Laravel Cronjob :: Status: 404 Not Found X-Powered-By: PHP/7.3.20 Content-type: text/html; charset=UTF-8 No input file specified
我不明白来自 cronjob 日志的错误消息
Status: 404 Not Found
X-Powered-By: PHP/7.3.20
Content-type: text/html; charset=UTF-8
No input file specified.
这是我在 cronjob 中的命令
cd /home/host/public_html && php register_argc_argv=1 artisan schedule:run >> /home/host/public_html/backup.log 2>&1
这是我在 kernel.php
的日程安排
protected function schedule(Schedule $schedule)
{
$schedule->call(function () {
$filename1 = base_path("/CSV/data.csv");
$filesize1 = filesize($filename1);
if($filesize1 > 0)
{
$file1 = fopen(base_path("/CSV/data.csv"), "r");
while (($getData1 = fgetcsv($file1, 10000, ";")) !== FALSE)
{
DB::table('tbdata')->insert([
'ID' => $getData1[0],
'Date_' => $getData1[1],
'Date' => $getData1[2],
'Status' => $getData1[3],
'Remark' => $getData1[4],
'SMS' => $getData1[5]
]);
}
fclose($file1);
unlink(base_path("/CSV/data.csv"));
}
})->daily();
}
请帮帮我
尝试
cd /home/host/public_html && php -d register_argc_argv=1 artisan schedule:run >> /home/host/public_html/backup.log 2>&1
要更改 ini 配置,您需要选项 d
-d foo[=bar] Define INI entry foo with value 'bar'
它试图找到文件 register_argc_argv=1
并得到 404
我不明白来自 cronjob 日志的错误消息
Status: 404 Not Found
X-Powered-By: PHP/7.3.20
Content-type: text/html; charset=UTF-8
No input file specified.
这是我在 cronjob 中的命令
cd /home/host/public_html && php register_argc_argv=1 artisan schedule:run >> /home/host/public_html/backup.log 2>&1
这是我在 kernel.php
的日程安排protected function schedule(Schedule $schedule)
{
$schedule->call(function () {
$filename1 = base_path("/CSV/data.csv");
$filesize1 = filesize($filename1);
if($filesize1 > 0)
{
$file1 = fopen(base_path("/CSV/data.csv"), "r");
while (($getData1 = fgetcsv($file1, 10000, ";")) !== FALSE)
{
DB::table('tbdata')->insert([
'ID' => $getData1[0],
'Date_' => $getData1[1],
'Date' => $getData1[2],
'Status' => $getData1[3],
'Remark' => $getData1[4],
'SMS' => $getData1[5]
]);
}
fclose($file1);
unlink(base_path("/CSV/data.csv"));
}
})->daily();
}
请帮帮我
尝试
cd /home/host/public_html && php -d register_argc_argv=1 artisan schedule:run >> /home/host/public_html/backup.log 2>&1
要更改 ini 配置,您需要选项 d
-d foo[=bar] Define INI entry foo with value 'bar'
它试图找到文件 register_argc_argv=1
并得到 404