1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Setting up cron job

Discussion in 'Plesk for Linux - 8.x and Older' started by Roosta21, Apr 18, 2007.

  1. Roosta21

    Roosta21 Guest

    0
     
    I have a website url that when inputted into a browser generates the update of a database.

    How would I set that up in plesk to run a cron jon to automate this task?
     
  2. albans

    albans Regular Pleskian

    26
     
    Joined:
    Nov 29, 2005
    Messages:
    173
    Likes Received:
    0
    Go to "scheduled tasks" under "Server", and add a new task for the user "root". The command should be like that:
    PHP:
    lynx --source -noredir -validate -verbose 'http://www.URL.tld/' > /tmp/mycron.log 2> /tmp/mycron_error.log
    Note: you've to get lynx installed on your host.
     
  3. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
    I guess you could also use curl or wget?
     
  4. Roosta21

    Roosta21 Guest

    0
     
    Thanks for the reply, tried both lynx and wget manually, as root, and they both get 403 forbidden..

    checked the logs and they returned the following..

    "client denied by server configuration:"

    The file is chmod to 777

    ??
     
  5. Roosta21

    Roosta21 Guest

    0
     
    Had a .htaccess file in blocking it, silly error :). Thanks for the command below it worked perfectly after i put ' ' at eith side of the url.

    Thanks again

    Ross
     
  6. albans

    albans Regular Pleskian

    26
     
    Joined:
    Nov 29, 2005
    Messages:
    173
    Likes Received:
    0
    Thanks for the info. I just corrected it!
     
Loading...