Cronjob
Schedule commands to run on a repeating schedule using user's crontab file.
Cronjobların set olunması üçün cronie paketinə ehtiyac var. Həmin paketi tapmaq üçün:
sudo yum whatprovides cronie
sudo yum install cronie-noanacron.x86_64 -ycheck if crond service is enabled:
systemctl enable crond.service --now
systemctl status crond.servicedisplay helpful info about crontab:
cat /etc/crontabTask 1:
Set cronjob for user natasha to do /bin/echohiya at 14:23.
Solution:
crontab -eu natasha
23 14 * * * /bin/echo hiya
# test if cronjob is created
crontab -lu natashaTask 2:
The user natasha must configure a cron job that runs daily at 14:23 local time and also the same cron job will run after every 2 minutes and executes.
Solution:
Task 3:
Configure a task: plan to run echo "file" command at 14:23 every day.
Solution:
Last updated
Was this helpful?