简体   繁体   中英

PHP CLI, WGET and CURL. Which one get better CPU/RAM performance using cronjob?

I'm setting several cronjobs for PHP scripts so I want to know which option is better to CPU/RAM performance. I have a CentOS 7.3 server

I would definitely go with PHP CLI, less overhead.

I run a few crontasks myself and just sticking the following in your crontab (changed to use your files of course) makes it simple.

php -f /var/www/cron.php

You can run some tests to confirm it's better for you though - see which one runs quicker and uses less memory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM