crond

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lammi

    #16
    Re: crond

    On 5 Jun., 16:13, "Jon Slaughter" <Jon_Slaugh...@ Hotmail.comwrot e:
    "shimmyshac k" <matt.fa...@gma il.comwrote in message
    >
    news:1181034186 .010284.213020@ p77g2000hsh.goo glegroups.com.. .
    >
    >
    >
    On Jun 5, 7:21 am,Lammi<Lorenz .Lammersd...@gm ail.comwrote:
    you mentioned it in the subject of your post - use cron.
    >>
    it's possible to call a php script via cron directly or you call a
    small shellscript, that open the php, f. e.
    >
    #!/bin/sh
    >
    # execute php script
    # -q =quiet, suppress the php-header
    php -q /home/mysql/script.php
    >
    if you can use cron cos you are on windows, use cronw instead. You can
    also register your script as a service and start that every day (the
    service could self-stop after its work is done) then you could use a
    line such as
    "service name" start
    in cron
    I dont see a point to registering as a service, but I mention it just
    for fun!
    >
    Actually guys, I have no idea how to run a script or anything on the web
    host's server but I assume they have this ability? (to schedule maintenance)
    >
    I think its a linux platform so I image they have crond or something like
    that. There web site forum was down last time I checked so I haven't found
    out whats really going on.
    >
    Thanks,
    Jon
    oh it's a hosted server? ask your hosting provider if cronjobs are
    possible. if not (or if you don't wanna ask :-) ), try
    http://www.cronjob.de/ f. e. (i'm sure there are similar services in
    english).

    Comment

    • Schraalhans Keukenmeester

      #17
      Re: crond

      At Tue, 05 Jun 2007 03:32:30 +0000, Jon Slaughter let h(is|er) monkeys
      type:
      How do I create a process that will be called periodically to do some task?
      This is not necessarily php but not sure where to ask.
      >
      Essentially I want to create either a php script or app(C++ would be nice)
      to run once a day that will generate a set of images to be used for
      captchas.
      >
      Any ideas or ideas where I can look for more info?
      >
      Thanks,
      Jon
      You could have your captcha-using script check the number of times your
      current set of captchas has been 'used' or subtract the time you last
      created captcha images from the current time and start the regeneration of
      a new batch instead of having to use cron or at.

      In practice, I would only worry about overtaxing the server if you have a
      massive number of visits each day. The imagefunction set provided by gd is
      pretty well opimised, your own C/C++ program might have a challenge trying
      to beat it.

      I've yet to see the first problem on a site I oversee creating captchas on
      the fly. Even on relatively low-end shared environments.

      I think you may be worrying about something that may never be a real
      problem here.


      --
      Schraalhans Keukenmeester - schraalhans@the .Spamtrapexampl e.nl
      [Remove the lowercase part of Spamtrap to send me a message]

      "strcmp('apples ','oranges') < 0"

      Comment

      Working...