久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <i id='x2iNd'><tr id='x2iNd'><dt id='x2iNd'><q id='x2iNd'><span id='x2iNd'><b id='x2iNd'><form id='x2iNd'><ins id='x2iNd'></ins><ul id='x2iNd'></ul><sub id='x2iNd'></sub></form><legend id='x2iNd'></legend><bdo id='x2iNd'><pre id='x2iNd'><center id='x2iNd'></center></pre></bdo></b><th id='x2iNd'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='x2iNd'><tfoot id='x2iNd'></tfoot><dl id='x2iNd'><fieldset id='x2iNd'></fieldset></dl></div>
    <legend id='x2iNd'><style id='x2iNd'><dir id='x2iNd'><q id='x2iNd'></q></dir></style></legend>

    <small id='x2iNd'></small><noframes id='x2iNd'>

      • <bdo id='x2iNd'></bdo><ul id='x2iNd'></ul>
    1. <tfoot id='x2iNd'></tfoot>

        無(wú)法運(yùn)行 PHP cron 腳本

        Cannot get PHP cron script to run(無(wú)法運(yùn)行 PHP cron 腳本)
            <bdo id='rLoIq'></bdo><ul id='rLoIq'></ul>
              <i id='rLoIq'><tr id='rLoIq'><dt id='rLoIq'><q id='rLoIq'><span id='rLoIq'><b id='rLoIq'><form id='rLoIq'><ins id='rLoIq'></ins><ul id='rLoIq'></ul><sub id='rLoIq'></sub></form><legend id='rLoIq'></legend><bdo id='rLoIq'><pre id='rLoIq'><center id='rLoIq'></center></pre></bdo></b><th id='rLoIq'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='rLoIq'><tfoot id='rLoIq'></tfoot><dl id='rLoIq'><fieldset id='rLoIq'></fieldset></dl></div>

              <small id='rLoIq'></small><noframes id='rLoIq'>

                <tbody id='rLoIq'></tbody>
              <tfoot id='rLoIq'></tfoot>
                • <legend id='rLoIq'><style id='rLoIq'><dir id='rLoIq'><q id='rLoIq'></q></dir></style></legend>
                  本文介紹了無(wú)法運(yùn)行 PHP cron 腳本的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  我有一個(gè)需要每分鐘運(yùn)行一次的 PHP 腳本.我已經(jīng)確保腳本可以從命令行運(yùn)行,并且我使用絕對(duì)路徑來(lái)避免任何環(huán)境問(wèn)題:

                  I have a PHP script that I need to run every minute. I have made sure that the script works from the command line, and I'm using absolute paths to avoid any environment issues:

                  /usr/bin/php -q /var/www/myapp/services/myservice.php
                  

                  從命令行以 root 用戶身份手動(dòng)運(yùn)行它可以正常工作,正如我從腳本寫(xiě)入的日志文件中看到的那樣.可以肯定的是,該腳本也具有執(zhí)行權(quán)限.

                  Manually running that as root from the command line works fine, as I can see from the log file that my script writes to. To be sure, the script has execute permissions as well.

                  但是,當(dāng)在 cron 中放置相同的命令時(shí):

                  However, when placing the same exact command in a cron:

                  * * * * * /usr/bin/php -q /var/www/myapp/services/myservice.php
                  

                  它沒(méi)有運(yùn)行,或者至少看起來(lái)是這樣.我也嘗試將輸出重定向到另一個(gè)日志文件:

                  It does not run or at least it appear so. I've tried redirecting the output to another log file too:

                  * * * * * /usr/bin/php -q /var/www/myapp/services/myservice.php >> /mylog.log 2>&1
                  

                  還是沒(méi)有.我沒(méi)有任何跡象表明正在運(yùn)行的腳本.我想它沒(méi)有,但我不知道還要尋找什么.我什至重新啟動(dòng)了 cron 守護(hù)進(jìn)程.

                  Still nothing. I have no indication whatsoever of the script being ran. I guess it doesn't, but I have no idea what else to look for. I even restarted the cron daemon.

                  我知道在 StackOverflow 上也有類(lèi)似的問(wèn)題,但沒(méi)有一個(gè)答案對(duì)我來(lái)說(shuō)是一個(gè)解決方案.這簡(jiǎn)直讓我發(fā)瘋了,我將不勝感激任何幫助.

                  I know there are similar questions on StackOverflow, but none of the answers turned out to be a solution for me. This is literally driving me crazy, I will greatly appreciate any help.

                  推薦答案

                  我找到了解決我的問(wèn)題的方法:

                  I found a solution for my issue:

                  https://serverfault.com/questions/97828/php-from-command-line-path-problems/97881#97881

                  事實(shí)證明我需要 cd(更改目錄)到腳本目錄中,然后調(diào)用它.令人驚訝,因?yàn)槲沂褂玫氖墙^對(duì)路徑,但它有效.感謝那些花時(shí)間回復(fù)的人.

                  It turns out I needed to cd (change directory) into the script dir and then call it. Surprising, since I'm using absolute paths, but it works. Thanks to those who have taken the time to respond.

                  這篇關(guān)于無(wú)法運(yùn)行 PHP cron 腳本的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動(dòng)游標(biāo)不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術(shù)方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個(gè)值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅(qū)動(dòng)程序)
                  <tfoot id='afwVz'></tfoot>
                  1. <i id='afwVz'><tr id='afwVz'><dt id='afwVz'><q id='afwVz'><span id='afwVz'><b id='afwVz'><form id='afwVz'><ins id='afwVz'></ins><ul id='afwVz'></ul><sub id='afwVz'></sub></form><legend id='afwVz'></legend><bdo id='afwVz'><pre id='afwVz'><center id='afwVz'></center></pre></bdo></b><th id='afwVz'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='afwVz'><tfoot id='afwVz'></tfoot><dl id='afwVz'><fieldset id='afwVz'></fieldset></dl></div>

                  2. <small id='afwVz'></small><noframes id='afwVz'>

                    1. <legend id='afwVz'><style id='afwVz'><dir id='afwVz'><q id='afwVz'></q></dir></style></legend>
                        <tbody id='afwVz'></tbody>
                          <bdo id='afwVz'></bdo><ul id='afwVz'></ul>
                          • 主站蜘蛛池模板: 中文字幕 欧美 日韩 | 一区二区电影网 | 翔田千里一区二区 | 国产美女福利在线观看 | 亚洲36d大奶网 | 秋霞a级毛片在线看 | 久久精品日产第一区二区三区 | 色毛片 | 国产精品中文字幕在线 | 懂色中文一区二区在线播放 | 亚洲精品乱码久久久久久按摩 | 亚洲福利| 黄色在线免费观看 | 成人性视频在线 | 精品成人佐山爱一区二区 | 久久精品免费一区二区三 | 日韩三| 成人精品一区二区三区中文字幕 | 99日韩| 曰批视频在线观看 | 国产精品久久久久久久久久免费 | 久久三区 | 午夜精品一区二区三区在线观看 | 福利片一区二区 | 999视频 | 精品欧美一区二区中文字幕视频 | 亚洲欧美aⅴ | 五月天天色| 久久成人免费视频 | 国产午夜精品一区二区三区四区 | 91av小视频 | 亚洲va国产日韩欧美精品色婷婷 | 91亚洲国产成人精品一区二三 | 欧美性久久久 | 亚洲欧美激情精品一区二区 | 91视频进入 | 国产99久久精品 | 中文在线a在线 | 国产一在线观看 | 亚洲五码在线 | 欧美高清视频在线观看 |