How to enable cron schedule in AWS EC2 instance

Step 1 – Connect to your ec2 instance ( follow below article )

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

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s