How to make the CentOS 7.3 to execute a php file every three minutes?
Clash Royale CLAN TAG#URR8PPP
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
|
show 10 more comments
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
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
|
show 10 more comments
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
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
linux centos
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
|
show 10 more comments
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
|
show 10 more comments
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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