Difference between revisions of "How to add crontab job"
Jump to navigation
Jump to search
(Created page with "{{GD Template Impl}} sudo crontab -e File:Crontab-step1.png Choose "1" then press Enter Add a line at the end of the file that reads like this: @reboot python /home/p...") |
|||
Line 1: | Line 1: | ||
{{GD Template Impl}} | {{GD Template Impl}} | ||
− | + | ==Add crontab job== | |
sudo crontab -e | sudo crontab -e | ||
Line 11: | Line 11: | ||
@reboot python /home/pi/x735-v2.5/pwm_fan_control.py | @reboot python /home/pi/x735-v2.5/pwm_fan_control.py | ||
− | Please note the path of this file | + | Please note the path of this file, this is very important!! |
[[File:Crontab-step2.png]] | [[File:Crontab-step2.png]] | ||
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. | 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. | ||
+ | |||
<!--Add review function! --> | <!--Add review function! --> |
Revision as of 11:08, 19 July 2021
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
Please note the path of this file, this is very important!!
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