Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter cargarm3

    (@cargarm3)

    In order to create a backgrouns process, I’ve created this inside an snippet :

    exec(“php -d memory_limit=2048M -d max_execution_time=9000 photo-to-text.com/public_html/wp-content/testing.php>exit.txt”);

    where the script testing.php has just a sleep(30);

    The problem is that snippet WAITS until the process testing finishes, and what I want is to run it in background.

    Any solution?

    Plugin Author Shea Bunge

    (@bungeshea)

    I believe you can add & to the end of shell commands to have them run in the background.

    exec("php -d memory_limit=2048M -d max_execution_time=9000 photo-to-text.com/public_html/wp-content/testing.php>exit.txt &");

    Thread Starter cargarm3

    (@cargarm3)

    Nice, thank you!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘exec() in snippet does not work ok’ is closed to new replies.