Write a timer task as follows:
I want to execute this command automatically every 30 minutes, but it doesn’t work.
With ps axu | grep cron, I checked that the process of cron was started, but in hibernation, as shown in the figure below:
Linux USES ubantu18.04
It is confused very much, small white introductory, consult everybody elder brother how to solve?
Check the crontab log..
There is a problem with the command above, crontab is not supported
&>>, should be used
2>&1, the details are as follows:
30 * * * * ls /home/baochunfen >> /home/baochunfen/crontab.txt 2>&1
crontabUsed by default
shDoes not support
&>>, if needed
bash, you can set
SHELL=/bin/bashIf the answer is useful, please accept the answer and thumb up.