"crontab" change dynamically shell

C++
echo "$(echo '* * * * * php /srv/path/to/file.php' ; crontab -l)" | crontab -
Source

Also in C++: