Thursday, December 29, 2022

How to run shell scripts with cron tasks

Shell script as below 

#!/bin/sh

mkdir /home/lucky/jh

cd /home/lucky/jh


Now we need to enter the below to the crontab 

crontab -e 

20 * * * * /home/lucky/myfile.sh


chmod +x /home/lucky/myfile.sh


references:

https://askubuntu.com/questions/350861/how-to-set-a-cron-job-to-run-a-shell-script

No comments:

Post a Comment