Hi@akhtar,
You can use a module named Cron in your Ansible Playbook. It can schedule your job according to your requirement as shown below.
- name: Cron Job
hosts: webservers
become: true
tasks:
- name: Crontab file exists
cron:
name: Add date and time to a file.
minute: "*/2"
hour: 9-16
weekday: 1-5
user: devops
job: df >> /home/devops/disk_usage
cron_file: disk_usage
state: present