How to make the CentOS 7.3 to execute a php file every three minutes?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












0















Under CentOS 7.3, I want to to execute a php file every three minutes.



And it should be thread safety.



But I don't know how to do with that.



The path is :



/Home/Controller/xy28.php


Update
path is:



/opengame/Application/Home/Controller/xy28.php









share|improve this question



















  • 1





    crontab -e and then */3 * * * * /usr/bin/php /Home/Controller/xy28.php finally press esc and :wq enter

    – LittleSmurfie
    Apr 22 '17 at 7:41











  • @LittleSmurfie I am not that familiar with Linux, Can you explain more about it? bro. thanks very much, I use Xmanager.

    – aircraft
    Apr 22 '17 at 7:44











  • I assume that you have a terminal for any user and php installed. First run "crontab -e" command. This will open a text editor like vim. Then press "i". This will take you to insert mode. Type this "*/3 * * * * /usr/bin/php /Home/Controller/xy28.php" then press "Esc" button. This will take you to command mode. Finally in command mode press ":" right after "wq" then press "Enter". Now we set a scheduled task for the user you logged in to terminal. Again I assume the user have the proper rights to accomplish that php script.

    – LittleSmurfie
    Apr 22 '17 at 7:54












  • @LittleSmurfie My friend, when I follow your steps to the last step, after I press 'Enter', I got the error:no crontab for root - using an empty one crontab: installing new crontab "/tmp/crontab.oD7RUA":1: bad hour errors in crontab file, can't install. Do you want to retry the same edit?

    – aircraft
    Apr 22 '17 at 8:08











  • @LittleSmurfie Please help me, my bro, I am struggle with it.

    – aircraft
    Apr 22 '17 at 8:11















0















Under CentOS 7.3, I want to to execute a php file every three minutes.



And it should be thread safety.



But I don't know how to do with that.



The path is :



/Home/Controller/xy28.php


Update
path is:



/opengame/Application/Home/Controller/xy28.php









share|improve this question



















  • 1





    crontab -e and then */3 * * * * /usr/bin/php /Home/Controller/xy28.php finally press esc and :wq enter

    – LittleSmurfie
    Apr 22 '17 at 7:41











  • @LittleSmurfie I am not that familiar with Linux, Can you explain more about it? bro. thanks very much, I use Xmanager.

    – aircraft
    Apr 22 '17 at 7:44











  • I assume that you have a terminal for any user and php installed. First run "crontab -e" command. This will open a text editor like vim. Then press "i". This will take you to insert mode. Type this "*/3 * * * * /usr/bin/php /Home/Controller/xy28.php" then press "Esc" button. This will take you to command mode. Finally in command mode press ":" right after "wq" then press "Enter". Now we set a scheduled task for the user you logged in to terminal. Again I assume the user have the proper rights to accomplish that php script.

    – LittleSmurfie
    Apr 22 '17 at 7:54












  • @LittleSmurfie My friend, when I follow your steps to the last step, after I press 'Enter', I got the error:no crontab for root - using an empty one crontab: installing new crontab "/tmp/crontab.oD7RUA":1: bad hour errors in crontab file, can't install. Do you want to retry the same edit?

    – aircraft
    Apr 22 '17 at 8:08











  • @LittleSmurfie Please help me, my bro, I am struggle with it.

    – aircraft
    Apr 22 '17 at 8:11













0












0








0


1






Under CentOS 7.3, I want to to execute a php file every three minutes.



And it should be thread safety.



But I don't know how to do with that.



The path is :



/Home/Controller/xy28.php


Update
path is:



/opengame/Application/Home/Controller/xy28.php









share|improve this question
















Under CentOS 7.3, I want to to execute a php file every three minutes.



And it should be thread safety.



But I don't know how to do with that.



The path is :



/Home/Controller/xy28.php


Update
path is:



/opengame/Application/Home/Controller/xy28.php






linux centos






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 26 at 16:04









Rui F Ribeiro

40.1k1479136




40.1k1479136










asked Apr 22 '17 at 7:20









aircraftaircraft

20012




20012







  • 1





    crontab -e and then */3 * * * * /usr/bin/php /Home/Controller/xy28.php finally press esc and :wq enter

    – LittleSmurfie
    Apr 22 '17 at 7:41











  • @LittleSmurfie I am not that familiar with Linux, Can you explain more about it? bro. thanks very much, I use Xmanager.

    – aircraft
    Apr 22 '17 at 7:44











  • I assume that you have a terminal for any user and php installed. First run "crontab -e" command. This will open a text editor like vim. Then press "i". This will take you to insert mode. Type this "*/3 * * * * /usr/bin/php /Home/Controller/xy28.php" then press "Esc" button. This will take you to command mode. Finally in command mode press ":" right after "wq" then press "Enter". Now we set a scheduled task for the user you logged in to terminal. Again I assume the user have the proper rights to accomplish that php script.

    – LittleSmurfie
    Apr 22 '17 at 7:54












  • @LittleSmurfie My friend, when I follow your steps to the last step, after I press 'Enter', I got the error:no crontab for root - using an empty one crontab: installing new crontab "/tmp/crontab.oD7RUA":1: bad hour errors in crontab file, can't install. Do you want to retry the same edit?

    – aircraft
    Apr 22 '17 at 8:08











  • @LittleSmurfie Please help me, my bro, I am struggle with it.

    – aircraft
    Apr 22 '17 at 8:11












  • 1





    crontab -e and then */3 * * * * /usr/bin/php /Home/Controller/xy28.php finally press esc and :wq enter

    – LittleSmurfie
    Apr 22 '17 at 7:41











  • @LittleSmurfie I am not that familiar with Linux, Can you explain more about it? bro. thanks very much, I use Xmanager.

    – aircraft
    Apr 22 '17 at 7:44











  • I assume that you have a terminal for any user and php installed. First run "crontab -e" command. This will open a text editor like vim. Then press "i". This will take you to insert mode. Type this "*/3 * * * * /usr/bin/php /Home/Controller/xy28.php" then press "Esc" button. This will take you to command mode. Finally in command mode press ":" right after "wq" then press "Enter". Now we set a scheduled task for the user you logged in to terminal. Again I assume the user have the proper rights to accomplish that php script.

    – LittleSmurfie
    Apr 22 '17 at 7:54












  • @LittleSmurfie My friend, when I follow your steps to the last step, after I press 'Enter', I got the error:no crontab for root - using an empty one crontab: installing new crontab "/tmp/crontab.oD7RUA":1: bad hour errors in crontab file, can't install. Do you want to retry the same edit?

    – aircraft
    Apr 22 '17 at 8:08











  • @LittleSmurfie Please help me, my bro, I am struggle with it.

    – aircraft
    Apr 22 '17 at 8:11







1




1





crontab -e and then */3 * * * * /usr/bin/php /Home/Controller/xy28.php finally press esc and :wq enter

– LittleSmurfie
Apr 22 '17 at 7:41





crontab -e and then */3 * * * * /usr/bin/php /Home/Controller/xy28.php finally press esc and :wq enter

– LittleSmurfie
Apr 22 '17 at 7:41













@LittleSmurfie I am not that familiar with Linux, Can you explain more about it? bro. thanks very much, I use Xmanager.

– aircraft
Apr 22 '17 at 7:44





@LittleSmurfie I am not that familiar with Linux, Can you explain more about it? bro. thanks very much, I use Xmanager.

– aircraft
Apr 22 '17 at 7:44













I assume that you have a terminal for any user and php installed. First run "crontab -e" command. This will open a text editor like vim. Then press "i". This will take you to insert mode. Type this "*/3 * * * * /usr/bin/php /Home/Controller/xy28.php" then press "Esc" button. This will take you to command mode. Finally in command mode press ":" right after "wq" then press "Enter". Now we set a scheduled task for the user you logged in to terminal. Again I assume the user have the proper rights to accomplish that php script.

– LittleSmurfie
Apr 22 '17 at 7:54






I assume that you have a terminal for any user and php installed. First run "crontab -e" command. This will open a text editor like vim. Then press "i". This will take you to insert mode. Type this "*/3 * * * * /usr/bin/php /Home/Controller/xy28.php" then press "Esc" button. This will take you to command mode. Finally in command mode press ":" right after "wq" then press "Enter". Now we set a scheduled task for the user you logged in to terminal. Again I assume the user have the proper rights to accomplish that php script.

– LittleSmurfie
Apr 22 '17 at 7:54














@LittleSmurfie My friend, when I follow your steps to the last step, after I press 'Enter', I got the error:no crontab for root - using an empty one crontab: installing new crontab "/tmp/crontab.oD7RUA":1: bad hour errors in crontab file, can't install. Do you want to retry the same edit?

– aircraft
Apr 22 '17 at 8:08





@LittleSmurfie My friend, when I follow your steps to the last step, after I press 'Enter', I got the error:no crontab for root - using an empty one crontab: installing new crontab "/tmp/crontab.oD7RUA":1: bad hour errors in crontab file, can't install. Do you want to retry the same edit?

– aircraft
Apr 22 '17 at 8:08













@LittleSmurfie Please help me, my bro, I am struggle with it.

– aircraft
Apr 22 '17 at 8:11





@LittleSmurfie Please help me, my bro, I am struggle with it.

– aircraft
Apr 22 '17 at 8:11










0






active

oldest

votes











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f360570%2fhow-to-make-the-centos-7-3-to-execute-a-php-file-every-three-minutes%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f360570%2fhow-to-make-the-centos-7-3-to-execute-a-php-file-every-three-minutes%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay