illutic
New member
I've been trying to set up a correct cron job for several weeks now, but still haven't been able to make it work..
I've been browsing through these forums for a few hours, found somethings I could use, but the cronjob still isn't working..
There are three files I want to execute every hour/every several minutes. One file is for PHPAdsNew, and two are for my website (deleting sent pm's weekly and making sure users are offline in the db when their ip-address isn't in the current visitors table).
My cronjobs look kinda like this:
* * * * * /usr/local/lib/php /home/USER/domains/DOMAIN/cronjobs/cronjob.php
Ofcourse USER stands for my username and DOMAIN for the domainname.
As you can see the cronjob.php is outside of the public_html folder (I also got one running inside the public_html to view which one is working, but neither one of them works right now)..
As far as I know I'm not able to view the cron log (viewed my log folder, but there's no folder in it called cron, or files that are called anything with the word cron or cronjob in it) and my host doesn't support the cron jobs (the package details say I can use them, though).
I've added a line to this .php file to insert a timestamp into my cronjob table when this file has been called, but so far no inserts in that table yet. I've also changed the chmod of the cronjobs folder and the cronjob.php to 777. And I've obtained the php path with calling phpinfo().
I really don't understand why the cronjobs won't work and would really appreciate any help.
I've been browsing through these forums for a few hours, found somethings I could use, but the cronjob still isn't working..
There are three files I want to execute every hour/every several minutes. One file is for PHPAdsNew, and two are for my website (deleting sent pm's weekly and making sure users are offline in the db when their ip-address isn't in the current visitors table).
My cronjobs look kinda like this:
* * * * * /usr/local/lib/php /home/USER/domains/DOMAIN/cronjobs/cronjob.php
Ofcourse USER stands for my username and DOMAIN for the domainname.
As you can see the cronjob.php is outside of the public_html folder (I also got one running inside the public_html to view which one is working, but neither one of them works right now)..
As far as I know I'm not able to view the cron log (viewed my log folder, but there's no folder in it called cron, or files that are called anything with the word cron or cronjob in it) and my host doesn't support the cron jobs (the package details say I can use them, though).
I've added a line to this .php file to insert a timestamp into my cronjob table when this file has been called, but so far no inserts in that table yet. I've also changed the chmod of the cronjobs folder and the cronjob.php to 777. And I've obtained the php path with calling phpinfo().
I really don't understand why the cronjobs won't work and would really appreciate any help.