Welcome, Guest
Username Password: Remember me

Run php script using cronjob / crontab
(1 viewing) (1) Guest
Shell Script
  • Page:
  • 1

TOPIC: Run php script using cronjob / crontab

Run php script using cronjob / crontab 10 months, 3 weeks ago #667

  • scmuser
  • OFFLINE
  • Gold Boarder
  • scm master
  • Posts: 237
  • Points: 3429
  • Karma: 0
  • Honor Medal 2009
How can i Run php script using cronjob / crontab???

Any ideA?

Re: Run php script using cronjob / crontab 10 months, 3 weeks ago #668

  • rajeshkumar
  • OFFLINE
  • Moderator
  • I love software configuration management
  • Posts: 370
  • Points: 44590
  • Karma: 4
  • Honor Medal 2009
If 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:

5 17 * * 2 /myscript.php

The above cron would run myscript.php in your home directory every Tuesday at 5:05PM.

some more example...

28 14 * * * /usr/local/bin/php -q /myscript.phtml
6 3 20 4 * /usr/local/bin/php -q /htdocs/www/x.php
Regards,
Rajesh Kumar
Build and Release Engineer
My Blog: community.scmgalaxy.com/pg/profile/rajeshkumar
  • Page:
  • 1
Time to create page: 0.65 seconds

     
    
Home Forum