I would like to set cron job in WordPress with WP Crontrol for update translations automatically. If I saw it right I have to create a PHP code (simple plugin) and then schedule it with mentioned plugin. How is it possible?
I found wp cli based solution. These below commands are useful for update translate files for core, themes and plugins:
wp language core update wp language theme update --all wp language plugin update --all
To schedule these commands, insert this line in crontab:
30 0 * * * wp language core update ; wp language theme update --all ; wp language plugin update --all
It will update all translate files once a day.
Shorter version of cron job:
30 0 * * * for i in "core update" "theme update --all" "plugin update --all"; do sudo wp language $i; done