2

I am currently using sleep() function for achieving some task but I am getting security bug in my sonarqube. Do we have any other function to achieve same task in PHP? Basically, I want to call the same function after every 10 seconds. I can not use a cron job as a cron job requires atleast a minute. Currently, I am running background task which in I am calling some function after every 10 seconds.

2
  • 1
    You can read about ob_start() and ob_flush() Commented Feb 24, 2018 at 9:15
  • What exactly is the "security bug in my sonarqube"? What what is the source code you are using? Commented Jun 9, 2018 at 12:11

1 Answer 1

2

Try this. After each time the sleep is done, use flush() and ob_flush() to flush the output buffer. That should solve the issue.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.