Announcement

Collapse
No announcement yet.

Long Processes

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Long Processes

    I'm looking for some advice on the best way(s) to execute major processes in a Linux/PHP/SC environment. For example if I want to run a program that takes 30-40 minutes, or maybe hours to run. My current code is in PHP and just running from a blank page. It does a lot of text manipulation so I though PHP might be a better environment for text handling than creating a MySQL procedure.

    These applications may need an interface to start but don't really require an interface while they are running. Although it would be nice if there was opportunity to check progress.

    Thanks

  • #2
    Well, php has it's execution time limits. But if you want to use php for this, then you might be helped by executing your script in a server shell, via PHP client. Also you can use a cron job. I also found this: http://www.manpagez.com/man/1/screen/ which might be helpful, but haven't used it.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Under linux you indeed need to create a cron job or try to use exec('php /pathtomyfile/myfile.php')
      I havent tested this but it should do the trick the easy way. If not add a shell call before it. Anyway see: http://us2.php.net/function.exec

      Comment


      • #4
        Actually, on Linux, PHP can be the shell script if you have the CLI version installed. So it is pretty easy to run it in a terminal and just echo out progress notes.

        Comment

        Working...
        X