Use cron service to execute additional commands as specified user using cron during system startup.
@reboot time specification to execute command once after reboot.
Root can use cron service to set noop IO scheduler for sda device at boot.
$ (sudo crontab -u root -l 2>/dev/null; echo -e "# io scheduler\[email protected] (/bin/echo noop | /usr/bin/tee /sys/block/sda/queue/scheduler)") | sudo crontab -u root -
$ sudo crontab -l
# use noop io scheduler for sda @reboot (/bin/echo noop | /usr/bin/tee /sys/block/sda/queue/scheduler)
User can use cron service to clear history at boot.
$ (crontab -u $(whoami) -l 2>/dev/null; echo -e "# clean history on reboot\[email protected] (: | /usr/bin/tee ~/.bash_history)") | crontab -u $(whoami) -
$ crontab -l
# clean history on reboot @reboot (: | /usr/bin/tee ~/.bash_history)
There are many more possibilities as you are not limited to these two simple usage scenarios.