A timing task is written as follows:
You want to automatically execute this command at the 30th minute of every hour, but it doesn’t work.
Use PS aXu | grep cron to check that the cron process is started, but in hibernation, as shown in the figure:
Linux uses Ubuntu 18.04
I’m very confused, beginner of Xiaobai. How can I help you?
Check the log of crontab
There is a problem with the above command, which is not supported by crontab
&>>, should use
2>&1, as follows:
30 * * * * ls /home/baochunfen >> /home/baochunfen/crontab.txt 2>&1
shI won’t support it
&>>, if you want to use
bash, can be set
SHELL=/bin/bash, if the answer is useful, please accept the answer and like.