You can try this piece of script:
(crontab -l; echo "@reboot echo "rebooted"";) | crontab -
Note that the update by this line of script is not atomic. If some other programs edit the crontab files between the first and second invokes of
crontab, the edits will be lost. Hence, make sure there is not other programs/admins editing the crontab when you use this piece of script.