Step 1 – Connect to your ec2 instance ( follow below article )
https://learnsqlteam.com/2018/11/30/how-to-connect-aws-ec2-instance-through-terminal/
step 2 – go to /etc – ( cd /etc )
step 3 – edit crontab ( nano crontab )
step 4 – define schedule and command
e.g. in this example I am sysning file b/w ec2 instance and s3 bucket in every min.
step 5 – start cron service if its not running
for debian/Ubuntu/Linux
sudo service cron status
sudo service cron stop
sudo service cron start
sudo service cron restart
for RHEL\CentOS\Fedora
sudo service crond status
sudo service crond stop
sudo service crond start
sudo service crond restart