Supervisord “exit status 1 not expected” running php script

前端 未结 3 1621
长情又很酷
长情又很酷 2021-01-12 04:16

I\'m having issue try to configure supervisor to run a php script. Running supervisor in debug mode gives me this:

2015-03-09 08:53:06,342 INFO supervisord s         


        
3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-12 05:09

    I've been using Supervisord for a while and this is what I have in my config:

    [program:worker1]
    command=php /absolute/path/to/myScript.php
    

    Reason I'm writing this as an anwser is due to formatting.

    Also, try this script:

    for(i = 0; i < 10; i++)
    {
        printf("\nIteration: %d", $i);
        usleep(1000 * 200); // 200 milliseconds between each printf
    }
    
    exit;
    

    And add it to supervision. It should be restarted after it does its echoing.

提交回复
热议问题