Results 1 to 3 of 3

Thread: Do I need to use cron for this?

  1. #1
    Join Date
    Aug 2006
    Posts
    130
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Do I need to use cron for this?

    Hello, I have programmed an auction site and now I want to send out an email to the winner and the seller with the contact information after the auction is over. I can make a page that generate all auctions thats ended and then set them to quantity = 0 and at the same time send out an email to the buyer and seller. Now heres the question. Should I use a cron job to update the page once in the hour or is it any other solution on how to send automatic emails during certain circumstances? I have no experience with cron but by webhost supports it so I can probably get it to work.

    One more thing. Does the website get slowed down if you use the cron job to often?

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    In this case the cron job is definitely the better way forward. If nobody accesses the site within three hours of the winner winning, for example, the winner won't get his/her email for another three hours.
    One more thing. Does the website get slowed down if you use the cron job to often?
    A little, certainly, but only due to the task. cron itself (or at least most distributions of it) has very little overhead.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franais | entiendo espaol | ti t hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Aug 2006
    Posts
    130
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the fast reply, I guess I will try to use CRON then.

    Do you know any good tutorials on how to get a CRON job up and running? I cant find any FAQ on how to use it at my webhost.

    Edit:

    I just got a respond from the host support section, they pointed me to a section where I can place the cron job but still got one little quesiton:

    It says "Mail to: <my mail>" should I change <my mail> to the page I want to get updated?

    Edit again:
    It was the report mail, I got everything up and running now.
    Last edited by Dennis_Gull; 04-29-2007 at 01:05 AM.

Bookmarks

Posting Permissions

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