I have Ubuntu 16.04. From here Run Scripts on Start UP. I followed this answer:
One approach is to add an @reboot cron task:
Running
crontab -e
will allow you to edit your cron. Adding a line like this to it:@reboot /path/to/script
will execute that script once your computer boots up.
I was successfully able to edit file crontab
.
but I couldn't be able to save it using:
:q
:wq
CTRL+x
None of them worked. I got this message on command :q
:
No write since Last Change (add ! to override
After executing command -
EDITOR=vi crontab -e
Output -
no crontab for admin - using an empty one
Again on executing command -
sudo EDITOR=vi crontab -e
Output -
no crontab for root - using an empty one
:q
, then:wq
should work.:wq
exit the window but it not savecron
file.crontab -l
show after you edit and do:wq
?which nano
to see if its there. It should be.