Difference between revisions of "How to add crontab job"
Jump to navigation
Jump to search
Line 15: | Line 15: | ||
@reboot python /home/pi/x-c1/fan.py | @reboot python /home/pi/x-c1/fan.py | ||
+ | or | ||
+ | |||
+ | or any other job you want to run automatically after boot | ||
<span style="color:red;">Please make sure that the file path and file name are correct</span> | <span style="color:red;">Please make sure that the file path and file name are correct</span> | ||
Revision as of 16:57, 27 April 2022
Add crontab job
sudo crontab -e
Choose "1" then press Enter
Add a line at the end of the file that reads like this:
@reboot python /home/pi/x735-v2.5/pwm_fan_control.py
or
@reboot python /home/pi/x-c1/fan.py
or
or any other job you want to run automatically after boot Please make sure that the file path and file name are correct
you can place the other shell command.
Save and exit (CTRK + O and ENTER to save it). In nano editor, you do that by hitting CTRL + X, answering Y and hitting Enter when prompted.
Please run 'sudo reboot' to reboot device to enable crontab job.
Remove crontab job
sudo crontab -e
then remove the command line by yourself.
Enable comment auto-refresher