Setup a cronjob for PHP script in ubuntu & PHP [duplicate]
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
-2
down vote
favorite
This question already has an answer here:
Why crontab scripts are not working?
46 answers
I want to setup a cronjob for PHP script in ubuntu
I have a script just I want to know how to set it.
* 3 * * * /var/www/html/booking_cron.php
php cron
marked as duplicate by karel, Eric Carvalho, David Foerster, Kevin Bowen, waltinator Apr 15 at 14:13
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |Â
up vote
-2
down vote
favorite
This question already has an answer here:
Why crontab scripts are not working?
46 answers
I want to setup a cronjob for PHP script in ubuntu
I have a script just I want to know how to set it.
* 3 * * * /var/www/html/booking_cron.php
php cron
marked as duplicate by karel, Eric Carvalho, David Foerster, Kevin Bowen, waltinator Apr 15 at 14:13
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
Check if the script is executable first. Then try to run it in Cron and if you get an error, try to google it first and ask a more specific question if your research is unsuccessful.
â Melebius
Mar 29 at 10:53
yes my script is ru and i m set it into windows but i dont kw how to set in ubantu - if i run * 3 * * * /var/www/html/booking_cron.php this command can set it
â Deep T
Mar 29 at 10:54
After your comment to the answer I must ask: Have you installed PHP on your Ubuntu yet?
â Melebius
Mar 29 at 12:39
@Melebius yes i have php and mysql in my ubantu machine
â Deep T
Mar 30 at 11:35
What's your question? What do you expect to happen and what happens instead? Can you run the command/var/www/html/booking_cron.php
as it is (i. e. without specifying the PHP interpreter explicitly) from a terminal? (see also How do I ask a good question?) Please edit your post when you want to clarify something or add information? ItâÂÂs best to have everything relevant in one place. Additionally, comments may be deleted for various reasons. Thanks.
â David Foerster
Apr 12 at 21:55
add a comment |Â
up vote
-2
down vote
favorite
up vote
-2
down vote
favorite
This question already has an answer here:
Why crontab scripts are not working?
46 answers
I want to setup a cronjob for PHP script in ubuntu
I have a script just I want to know how to set it.
* 3 * * * /var/www/html/booking_cron.php
php cron
This question already has an answer here:
Why crontab scripts are not working?
46 answers
I want to setup a cronjob for PHP script in ubuntu
I have a script just I want to know how to set it.
* 3 * * * /var/www/html/booking_cron.php
This question already has an answer here:
Why crontab scripts are not working?
46 answers
php cron
php cron
edited Mar 29 at 10:50
Melebius
3,77841636
3,77841636
asked Mar 29 at 10:47
Deep T
61
61
marked as duplicate by karel, Eric Carvalho, David Foerster, Kevin Bowen, waltinator Apr 15 at 14:13
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by karel, Eric Carvalho, David Foerster, Kevin Bowen, waltinator Apr 15 at 14:13
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
Check if the script is executable first. Then try to run it in Cron and if you get an error, try to google it first and ask a more specific question if your research is unsuccessful.
â Melebius
Mar 29 at 10:53
yes my script is ru and i m set it into windows but i dont kw how to set in ubantu - if i run * 3 * * * /var/www/html/booking_cron.php this command can set it
â Deep T
Mar 29 at 10:54
After your comment to the answer I must ask: Have you installed PHP on your Ubuntu yet?
â Melebius
Mar 29 at 12:39
@Melebius yes i have php and mysql in my ubantu machine
â Deep T
Mar 30 at 11:35
What's your question? What do you expect to happen and what happens instead? Can you run the command/var/www/html/booking_cron.php
as it is (i. e. without specifying the PHP interpreter explicitly) from a terminal? (see also How do I ask a good question?) Please edit your post when you want to clarify something or add information? ItâÂÂs best to have everything relevant in one place. Additionally, comments may be deleted for various reasons. Thanks.
â David Foerster
Apr 12 at 21:55
add a comment |Â
Check if the script is executable first. Then try to run it in Cron and if you get an error, try to google it first and ask a more specific question if your research is unsuccessful.
â Melebius
Mar 29 at 10:53
yes my script is ru and i m set it into windows but i dont kw how to set in ubantu - if i run * 3 * * * /var/www/html/booking_cron.php this command can set it
â Deep T
Mar 29 at 10:54
After your comment to the answer I must ask: Have you installed PHP on your Ubuntu yet?
â Melebius
Mar 29 at 12:39
@Melebius yes i have php and mysql in my ubantu machine
â Deep T
Mar 30 at 11:35
What's your question? What do you expect to happen and what happens instead? Can you run the command/var/www/html/booking_cron.php
as it is (i. e. without specifying the PHP interpreter explicitly) from a terminal? (see also How do I ask a good question?) Please edit your post when you want to clarify something or add information? ItâÂÂs best to have everything relevant in one place. Additionally, comments may be deleted for various reasons. Thanks.
â David Foerster
Apr 12 at 21:55
Check if the script is executable first. Then try to run it in Cron and if you get an error, try to google it first and ask a more specific question if your research is unsuccessful.
â Melebius
Mar 29 at 10:53
Check if the script is executable first. Then try to run it in Cron and if you get an error, try to google it first and ask a more specific question if your research is unsuccessful.
â Melebius
Mar 29 at 10:53
yes my script is ru and i m set it into windows but i dont kw how to set in ubantu - if i run * 3 * * * /var/www/html/booking_cron.php this command can set it
â Deep T
Mar 29 at 10:54
yes my script is ru and i m set it into windows but i dont kw how to set in ubantu - if i run * 3 * * * /var/www/html/booking_cron.php this command can set it
â Deep T
Mar 29 at 10:54
After your comment to the answer I must ask: Have you installed PHP on your Ubuntu yet?
â Melebius
Mar 29 at 12:39
After your comment to the answer I must ask: Have you installed PHP on your Ubuntu yet?
â Melebius
Mar 29 at 12:39
@Melebius yes i have php and mysql in my ubantu machine
â Deep T
Mar 30 at 11:35
@Melebius yes i have php and mysql in my ubantu machine
â Deep T
Mar 30 at 11:35
What's your question? What do you expect to happen and what happens instead? Can you run the command
/var/www/html/booking_cron.php
as it is (i. e. without specifying the PHP interpreter explicitly) from a terminal? (see also How do I ask a good question?) Please edit your post when you want to clarify something or add information? ItâÂÂs best to have everything relevant in one place. Additionally, comments may be deleted for various reasons. Thanks.â David Foerster
Apr 12 at 21:55
What's your question? What do you expect to happen and what happens instead? Can you run the command
/var/www/html/booking_cron.php
as it is (i. e. without specifying the PHP interpreter explicitly) from a terminal? (see also How do I ask a good question?) Please edit your post when you want to clarify something or add information? ItâÂÂs best to have everything relevant in one place. Additionally, comments may be deleted for various reasons. Thanks.â David Foerster
Apr 12 at 21:55
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
You need to call php binary with argument of the php script:
* 3 * * * /usr/bin/php /var/www/html/booking_cron.php
Be sure your path to php binary is correct.
To find the path to php: which php
or find / -name php
yes path is correct but it can run properly.
â Deep T
Mar 29 at 10:58
you need to add php binary first, otherwise the script will not run.
â kukulo
Mar 29 at 11:10
what is php binary
â Deep T
Mar 29 at 11:28
1
@DEEPAKBHOSALE The php binary is/usr/bin/php
.
â PerlDuck
Mar 29 at 11:33
@ PerlDuck thanks..
â Deep T
Apr 11 at 9:40
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
You need to call php binary with argument of the php script:
* 3 * * * /usr/bin/php /var/www/html/booking_cron.php
Be sure your path to php binary is correct.
To find the path to php: which php
or find / -name php
yes path is correct but it can run properly.
â Deep T
Mar 29 at 10:58
you need to add php binary first, otherwise the script will not run.
â kukulo
Mar 29 at 11:10
what is php binary
â Deep T
Mar 29 at 11:28
1
@DEEPAKBHOSALE The php binary is/usr/bin/php
.
â PerlDuck
Mar 29 at 11:33
@ PerlDuck thanks..
â Deep T
Apr 11 at 9:40
add a comment |Â
up vote
1
down vote
You need to call php binary with argument of the php script:
* 3 * * * /usr/bin/php /var/www/html/booking_cron.php
Be sure your path to php binary is correct.
To find the path to php: which php
or find / -name php
yes path is correct but it can run properly.
â Deep T
Mar 29 at 10:58
you need to add php binary first, otherwise the script will not run.
â kukulo
Mar 29 at 11:10
what is php binary
â Deep T
Mar 29 at 11:28
1
@DEEPAKBHOSALE The php binary is/usr/bin/php
.
â PerlDuck
Mar 29 at 11:33
@ PerlDuck thanks..
â Deep T
Apr 11 at 9:40
add a comment |Â
up vote
1
down vote
up vote
1
down vote
You need to call php binary with argument of the php script:
* 3 * * * /usr/bin/php /var/www/html/booking_cron.php
Be sure your path to php binary is correct.
To find the path to php: which php
or find / -name php
You need to call php binary with argument of the php script:
* 3 * * * /usr/bin/php /var/www/html/booking_cron.php
Be sure your path to php binary is correct.
To find the path to php: which php
or find / -name php
edited Mar 31 at 9:50
Melebius
3,77841636
3,77841636
answered Mar 29 at 10:54
kukulo
912416
912416
yes path is correct but it can run properly.
â Deep T
Mar 29 at 10:58
you need to add php binary first, otherwise the script will not run.
â kukulo
Mar 29 at 11:10
what is php binary
â Deep T
Mar 29 at 11:28
1
@DEEPAKBHOSALE The php binary is/usr/bin/php
.
â PerlDuck
Mar 29 at 11:33
@ PerlDuck thanks..
â Deep T
Apr 11 at 9:40
add a comment |Â
yes path is correct but it can run properly.
â Deep T
Mar 29 at 10:58
you need to add php binary first, otherwise the script will not run.
â kukulo
Mar 29 at 11:10
what is php binary
â Deep T
Mar 29 at 11:28
1
@DEEPAKBHOSALE The php binary is/usr/bin/php
.
â PerlDuck
Mar 29 at 11:33
@ PerlDuck thanks..
â Deep T
Apr 11 at 9:40
yes path is correct but it can run properly.
â Deep T
Mar 29 at 10:58
yes path is correct but it can run properly.
â Deep T
Mar 29 at 10:58
you need to add php binary first, otherwise the script will not run.
â kukulo
Mar 29 at 11:10
you need to add php binary first, otherwise the script will not run.
â kukulo
Mar 29 at 11:10
what is php binary
â Deep T
Mar 29 at 11:28
what is php binary
â Deep T
Mar 29 at 11:28
1
1
@DEEPAKBHOSALE The php binary is
/usr/bin/php
.â PerlDuck
Mar 29 at 11:33
@DEEPAKBHOSALE The php binary is
/usr/bin/php
.â PerlDuck
Mar 29 at 11:33
@ PerlDuck thanks..
â Deep T
Apr 11 at 9:40
@ PerlDuck thanks..
â Deep T
Apr 11 at 9:40
add a comment |Â
Check if the script is executable first. Then try to run it in Cron and if you get an error, try to google it first and ask a more specific question if your research is unsuccessful.
â Melebius
Mar 29 at 10:53
yes my script is ru and i m set it into windows but i dont kw how to set in ubantu - if i run * 3 * * * /var/www/html/booking_cron.php this command can set it
â Deep T
Mar 29 at 10:54
After your comment to the answer I must ask: Have you installed PHP on your Ubuntu yet?
â Melebius
Mar 29 at 12:39
@Melebius yes i have php and mysql in my ubantu machine
â Deep T
Mar 30 at 11:35
What's your question? What do you expect to happen and what happens instead? Can you run the command
/var/www/html/booking_cron.php
as it is (i. e. without specifying the PHP interpreter explicitly) from a terminal? (see also How do I ask a good question?) Please edit your post when you want to clarify something or add information? ItâÂÂs best to have everything relevant in one place. Additionally, comments may be deleted for various reasons. Thanks.â David Foerster
Apr 12 at 21:55