Results 1 to 6 of 6

Thread: PHPAdsNew and cron

  1. #1
    Join Date
    Mar 2006
    Posts
    463

    Question PHPAdsNew and cron

    I installed PHPAdsNew and am currently trying to get my head round it and it looks like a powerful script.

    The only thing Iīm stuck on is to run the maintenance cron job. I went to the help centre and looked up how to do it using the standard method.

    "/usr/bin/php -q /home/USERNAME/public_html/PathToFile"

    so this would equate to:

    "/usr/bin/php -q /home/Myuser/public_html/PHPAdsNew/maintenance/maintenance.php"

    However, this doesnīt seem to work as PHPAds tells me on every login that the maintenance script hasnīt been run.

    I am also confused as to what to put for USERNAME. I log into my CPanel with username "mysite.com" but I access my site via ftp with username "mysite".

    When I "save the crontab" no record of the saved cron appears anywhere. Is this supposed to happen?

    Can somebody tell me where Iīve gone wrong?
    Cheap web hosting review directory listing a
    Hostmonster review and a Bluehost review - CPU, support, plans, speed test, uptime

  2. #2
    Join Date
    Mar 2006
    Posts
    100

    Default

    I dont know about PHPAdsNew, never used it, but your username would be the first 8 letters of your domain name. So if your domain is myawesomewebsite.com, then your username is "myawesom".

  3. #3
    Join Date
    Feb 2006
    Posts
    626

    Default

    I run it on another site and it really is an awesome script! You might want to try something like this for your cron ...

    Code:
    55 * * * * wget -q -O http://www.yourdomain.com/phpAdsNew/maintenance.php
    Basically "wget" is letting you run "maintenance.php" like it was a request coming from a browser. It's been a long time so I don't recall what the "-q -O" do and/or if you need them here but this is what I use on my other site.

  4. #4
    Join Date
    Mar 2006
    Posts
    463

    Default

    Thanks, siguie but for that I need to apply for SSH access first (maybe a good incentive to get that done, finally.)
    But for the time being I tried to work the cron from within CPanel.

    @nine I tried the first 8 letters but for some reason my cron is not recorded.


    Has anybody else got any experience with setting up a cron to execute a php file via the standard cron tab?
    Cheap web hosting review directory listing a
    Hostmonster review and a Bluehost review - CPU, support, plans, speed test, uptime

  5. #5
    Join Date
    Feb 2006
    Posts
    626

    Default

    Quote Originally Posted by hofmax
    Thanks, siguie but for that I need to apply for SSH access first (maybe a good incentive to get that done, finally.)
    Uh what? no you don't just use the advanced setting in cron on the cpanel OR just use "wget -q -O http://www.yourdomain.com/phpAdsNew/maintenance.php" as the command line in the simple cron and select the time in those drop down menu thangs.

    I use the "wget" here for my calendar reminders and at some other sites I have that don't allow cron jobs.

  6. #6
    Join Date
    Mar 2006
    Posts
    463

    Default

    Cheers! At least I got the crontab update message. But is this cron supposed to be recorded somewhere where it says cron x doing this or that? Because there isnīt anything if I go back into the cron menu.
    Cheap web hosting review directory listing a
    Hostmonster review and a Bluehost review - CPU, support, plans, speed test, uptime

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •