Cron Jobs are closed on my server and server admin doesn't accept open it. Because , cron jobs slowing server etc. So, i need an alternative.
I have to run a php file (cron.php) every 2 minutes.
So, how can i do this ?
Timed Jobs Using cron Note: Although it is still supported, cron is not a recommended solution. It has been deprecated in favor of launchd .
With a few simple tasks in a DAG, Airflow is a beautiful cron alternative or even as a replacement for data pipelines otherwise managed by cron. It is time to start using this in everyday big data processing.
*/5 * * * * Execute a cron job every 5 minutes. 0 * * * * Execute a cron job every hour.
Even though the question was posted a while ago, I just had the same problem but found a solution (based on Kissaki's answer, thanks!) and thought I'd post it here for anyone still looking for a possible solution.
Prerequisites:
Code (python):
from subprocess import call
import time
while True:
call(["php","cron.php"])
time.sleep(120)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With