Hi,
Is it possible for me to set up a php script to be executed every hour? Like a cron job or something? If so, how? Thanks in advance.
Hi,
Is it possible for me to set up a php script to be executed every hour? Like a cron job or something? If so, how? Thanks in advance.
I have not tried this but if you have shell access you should be able to add a cron entry by typing
Also don't forget to add the following to the top of your php fileCode:crontab -e
as well as give your file execute permissions with chmod.Code:#!/usr/local/bin/php
Cron jobs can be setup right from the H-Sphere control panel. It is listed under FTP & Shell Accounts.
Karl Zimmerman
President/CEO - NoZone, Inc./Steadfast Networks
http://steadfast.net
karl@steadfast.net
I'm also trying to set this up. I had it working at my old host but for some reason can't get it here. I think I might be doing the command wrong, so any help would be appreciated.
I put the #! thing in my page, as stated before I had it working at my old host.
Right now I have the settings as
*/5 * * * * /usr/local/bin/php /hsphere/local/home/crabrock/path to file
This is how I had it set up before, but I'm not entirely sure on the path I should be using. Is this the correct way to do it?
crabrock,
The path will be similar to the following:
/hsphere/local/home/username/domain.com/path/to/file
I'm not sure if you were including the domain name already, but it needs to be in the path.
That looks like the right path for PHP and such. If it still doesn't work after double checking the path, I'd probably suggest asking support for more information...
Ray Tetzloff
yea, i included all that, it was just really long so i took it out of my post.
I copied the file location straight out of my ftp browser, i set the chmod to 777
well rats.
Bookmarks