Run a infinite loop in your another long-term running program, which is basically run-php + sleep
. (As for me, I have a python program listing socket so it is proper for use.)
- want more flexible and not use windows task scheduler, so your program can be easily deploy to a new computer
- want more flexible time scheduler (like run it after 1min then after 2min then 1min)
I know it is not the most commonly seen solution, but it suits some special usage like me. :)
One more tip:
Laravel
or other frameworks have a strong support for time-schedule. If you have complex demand, you can use them.