{"id":2268,"date":"2017-12-08T06:08:16","date_gmt":"2017-12-08T06:08:16","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=2268"},"modified":"2020-01-09T10:00:17","modified_gmt":"2020-01-09T10:00:17","slug":"run-php-script-using-cronjob-crontab","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/run-php-script-using-cronjob-crontab\/","title":{"rendered":"Run php script using cronjob \/ crontab"},"content":{"rendered":"<p><strong>scmuser created the topic: Run php script using cronjob \/ crontab<\/strong><br \/>\nHow can i Run php script using cronjob \/ crontab???<\/p>\n<p>Any ideA?<\/p>\n<p><strong>rajeshkumar replied the topic: Re: Run php script using cronjob \/ crontab<\/strong><br \/>\nIf your PHP scripts do have executable permissions like 755 or -rwxr-xr-x and they have one of the PHP filename extensions above, then you do not need to specify the php interpreter in the command portion of your cron line, like this:<\/p>\n<p>5 17 * * 2 \/myscript.php<\/p>\n<p>The above cron would run myscript.php in your home directory every Tuesday at 5:05PM.<\/p>\n<p>some more example&#8230;<\/p>\n<p>28 14 * * * \/usr\/local\/bin\/php -q \/myscript.phtml<br \/>\n6 3 20 4 * \/usr\/local\/bin\/php -q \/htdocs\/www\/x.php<br \/>\nRegards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @ <a href=\"http:\/\/twitter.com\/RajeshKumarIn\">twitter.com\/RajeshKumarIn<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>scmuser created the topic: Run php script using cronjob \/ crontab How can i Run php script using cronjob \/ crontab??? Any ideA? rajeshkumar replied the topic:&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[454],"tags":[278],"class_list":["post-2268","post","type-post","status-publish","format-standard","hentry","category-shell-script","tag-script"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=2268"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2268\/revisions"}],"predecessor-version":[{"id":2269,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2268\/revisions\/2269"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=2268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=2268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=2268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}