Cron Jobs

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
Watch

Brndnjng

Established Member
Impact
1
I want to run a php script every three hours. How can I do this with a unix server cron job?

Thanks in advance.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Do you have cpanel acess? If you do then this can be completed very easily
 
0
•••
Yes, but you need access to the PHP cli interface. From there, assuming php is in /usr/bin:

* */3 * * * /usr/bin/php /path/to/script

You can also specify the shebang (#!/usr/bin/php) in teh top of your file if you dont' need this script to be processed by the webserver in any way. Then just use the full path to the script.
 
0
•••
CatchedCatched

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover
URLs.com
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back