onion site runs on php and there is a crontab running like this:
Then cron.php generates and executes a bash file that runs other php stuff and also includes or requires some php files. There are numerous php functions like:
that connect to different service in clearnet.
It's okay when these php functions run by web server as hidden service. But when running in cli these functions will disclose my real IP address.
I modified crontab like this:
/usr/bin/torsocks /usr/bin/php /path/to/site/cron.php
But can I be aware that there are no circumstances when this does not work?