Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default Automated tasks

    Hi,

    I have an auction site running. Now I want the auction to be able to
    automatically send a mail msg to the seller after it expires. How do I do
    it? Obviously there is some sort of way that I can employ so that this task
    does not require an operator (such as me) to run manually. This task will
    involve accessing the database and sending an email. Can somebody enlighten
    me on this?

    ==James==


    L'Angel Admirable Guest

  2. Similar Questions and Discussions

    1. Automated PDF Creation
      Many years ago we used to have a server that ran Distiller and we dragged and dropped files onto the server and PDFs were created. Then Adobe wrote...
    2. background tasks without "scheduled tasks"
      I'm doing some work for a company that has an auction site running in coldfusion. They're not real happy with it, and it needs a major overhaul,...
    3. Automated updates
      Hi, I am currently a university student in the UK and am studying business computing degree. For my dissertation I am researching the use of...
    4. Automated Filelist.
      Hi! I want to build a PHP-Site, wich lists some downloadable files in some directories from our internet server. Can anyone tell me some...
    5. automated response
      Hi... Just wanted to let you know we received your message. Corey and Jay http://www.coreyandjayshow.com...
  3. #2

    Default Re: Automated tasks

    You could run a PHP script from a cron task and verify if there are
    mails to be sent. It wouldn't be sent at the exact second but I do think
    it's the best solution. You could include a verification in your scripts
    but running that every load is quite useless and takes CPU time off
    your server.

    L'Angel Admirable wrote:
    > Hi,
    >
    > I have an auction site running. Now I want the auction to be able to
    > automatically send a mail msg to the seller after it expires. How do I do
    > it? Obviously there is some sort of way that I can employ so that this task
    > does not require an operator (such as me) to run manually. This task will
    > involve accessing the database and sending an email. Can somebody enlighten
    > me on this?
    >
    > ==James==
    >
    >
    Louis-Philippe Huberdeau Guest

  4. #3

    Default Re: Automated tasks


    "L'Angel Admirable" <jamesjiao@paradise.net.nz> wrote in message
    news:9eXob.4420$ws.428845@news02.tsnz.net...
    > Hi,
    >
    > I have an auction site running. Now I want the auction to be able to
    > automatically send a mail msg to the seller after it expires. How do I do
    > it? Obviously there is some sort of way that I can employ so that this
    task
    > does not require an operator (such as me) to run manually. This task will
    > involve accessing the database and sending an email. Can somebody
    enlighten
    > me on this?
    >
    > ==James==
    PHP does not have a job scheduler so the short answer is no, you can't do
    this reliably using PHP alone.

    The long answer is that you could have an external schedular, like
    Unix/Linux cron that could call and activate your script... Alternativly,
    you could have some check that when ever anyone visits your site, it checks
    cloesd auctions and creates the mailers... but this would mean that the
    email activity would only be acivated (unknowingly) by a visitor - thus a
    server with a period of inactivity would not send the mailers... It really
    wouldn't be reliable and could give mixed if implemented badly (ie two folk
    visiting at the same time initiating two checks on the same auctions
    resulting in two or more emails being sent out with the same notification
    messages contained - or a timeout occuring before the scripts have properly
    completed).

    Your best bet would be an external schedular, like cron.


    Randell D. Guest

  5. #4

    Default Re: Automated tasks

    Thanks.. Randell, I am just wondering where do the cron configuration files
    reside on a redhat system, so that I can schedule some sort of tasks?

    ==James==

    "Randell D." <you.can.email.me.at.randelld@yahoo.com> wrote in message
    news:cf%ob.254615$9l5.132086@pd7tw2no...
    >
    > "L'Angel Admirable" <jamesjiao@paradise.net.nz> wrote in message
    > news:9eXob.4420$ws.428845@news02.tsnz.net...
    > > Hi,
    > >
    > > I have an auction site running. Now I want the auction to be able to
    > > automatically send a mail msg to the seller after it expires. How do I
    do
    > > it? Obviously there is some sort of way that I can employ so that this
    > task
    > > does not require an operator (such as me) to run manually. This task
    will
    > > involve accessing the database and sending an email. Can somebody
    > enlighten
    > > me on this?
    > >
    > > ==James==
    >
    > PHP does not have a job scheduler so the short answer is no, you can't do
    > this reliably using PHP alone.
    >
    > The long answer is that you could have an external schedular, like
    > Unix/Linux cron that could call and activate your script... Alternativly,
    > you could have some check that when ever anyone visits your site, it
    checks
    > cloesd auctions and creates the mailers... but this would mean that the
    > email activity would only be acivated (unknowingly) by a visitor - thus a
    > server with a period of inactivity would not send the mailers... It really
    > wouldn't be reliable and could give mixed if implemented badly (ie two
    folk
    > visiting at the same time initiating two checks on the same auctions
    > resulting in two or more emails being sent out with the same notification
    > messages contained - or a timeout occuring before the scripts have
    properly
    > completed).
    >
    > Your best bet would be an external schedular, like cron.
    >
    >

    L'Angel Admirable Guest

  6. #5

    Default Re: Automated tasks

    On Mon, 03 Nov 2003 03:28:32 GMT, "Randell D."
    <you.can.email.me.at.randelld@yahoo.com> wrote:
    >$ man 5 cron
    >
    >or
    >
    >$ man 5 crontab
    >
    >To understand the layout - however, if you have a rough idea on cron, then
    >do
    >
    ># crontab -e
    >
    >This will edit your existing crontab setup - Note, if you are not a root
    >user, you must have root privilages (there is a file called cron.allow that
    >would have usernames listed of those who do have cron access - secondly,
    >becareful on how you write your scripts because they will be executed with
    >'root' access - You could easily write a script to remove every file on the
    >system... so check and double check your code).
    Not sure about how Redhat sets this up, but it's quite normal for normal users
    to have cron access. Their jobs do NOT get run as root - that'd be a nightmare!
    They get run as the owner of the crontab entry.

    --
    Andy Hassall (andy@andyh.co.uk) icq(5747695) ([url]http://www.andyh.co.uk[/url])
    Space: disk usage analysis tool ([url]http://www.andyhsoftware.co.uk/space[/url])
    Andy Hassall Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139