# Quick question- how to run ansible playbook on Saturday night at 12 PM and save the output in amazon s3 bucket

**URL:** <https://forum.ansible.com/t/quick-question-how-to-run-ansible-playbook-on-saturday-night-at-12-pm-and-save-the-output-in-amazon-s3-bucket/32071>\
**Category:** Ansible Project\
**Created:** [January 28, 2020, 7:08am UTC](https://forum.ansible.com/t/quick-question-how-to-run-ansible-playbook-on-saturday-night-at-12-pm-and-save-the-output-in-amazon-s3-bucket/32071 "2020-01-28T07:08:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Work\_Email](https://avatars.discourse-cdn.com/v4/letter/w/34f0e0/32.png) [@Work\_Email](https://forum.ansible.com/u/Work_Email)\
**Post date:** [January 28, 2020, 7:08am UTC](https://forum.ansible.com/t/quick-question-how-to-run-ansible-playbook-on-saturday-night-at-12-pm-and-save-the-output-in-amazon-s3-bucket/32071/1 "2020-01-28T07:08:26Z")

</div>

Quick question- how to run ansible-playbook on Saturday night at 12 PM and save the output in the amazon s3 bucket- “abc”?

---

<div class="post-metadata">

**Author:** ![Work\_Email](https://avatars.discourse-cdn.com/v4/letter/w/34f0e0/32.png) [@Work\_Email](https://forum.ansible.com/u/Work_Email)\
**Post date:** [January 29, 2020, 3:06am UTC](https://forum.ansible.com/t/quick-question-how-to-run-ansible-playbook-on-saturday-night-at-12-pm-and-save-the-output-in-amazon-s3-bucket/32071/2 "2020-01-29T03:06:58Z")

</div>

Any update is appreciated!

---

<div class="post-metadata">

**Author:** ![naveen\_s](https://avatars.discourse-cdn.com/v4/letter/n/eada6e/32.png) [@naveen\_s](https://forum.ansible.com/u/naveen_s)\
**Post date:** [January 29, 2020, 11:17am UTC](https://forum.ansible.com/t/quick-question-how-to-run-ansible-playbook-on-saturday-night-at-12-pm-and-save-the-output-in-amazon-s3-bucket/32071/3 "2020-01-29T11:17:17Z")

</div>

Hello ,

You can schedule a ansible playbook via ansible tower by using schedule option. By using this you can schedule the job when to run.  
Install aws Cli on your ansible master server and create aws credentials to communicate from ansible server to aws.

Once the setup is done. If you already have a existing s3 bucket then configure it or else create a new s3 bucket and integrate.

Regards,  
Naveen

---

<div class="post-metadata">

**Author:** ![dmartin](https://avatars.discourse-cdn.com/v4/letter/d/c4cdca/32.png) [@dmartin](https://forum.ansible.com/u/dmartin)\
**Post date:** [January 29, 2020, 5:06pm UTC](https://forum.ansible.com/t/quick-question-how-to-run-ansible-playbook-on-saturday-night-at-12-pm-and-save-the-output-in-amazon-s3-bucket/32071/4 "2020-01-29T17:06:05Z")

</div>

What environment are you in?

I have linux servers in a datacenter. I’d write a shell script to run the play, output to a file and copy the file to s3. Then I’d use cron to schedule the job. Of course, you’d need to use a passwordless ssh key or set up ssh-agent ahead of time to work with cron, which can be a little tricky.

So, basically how you’d schedule any task, with extra attention paid to the ssh auth.

---

<div class="post-metadata">

**Author:** ![Work\_Email](https://avatars.discourse-cdn.com/v4/letter/w/34f0e0/32.png) [@Work\_Email](https://forum.ansible.com/u/Work_Email)\
**Post date:** [January 29, 2020, 9:17pm UTC](https://forum.ansible.com/t/quick-question-how-to-run-ansible-playbook-on-saturday-night-at-12-pm-and-save-the-output-in-amazon-s3-bucket/32071/5 "2020-01-29T21:17:46Z")

</div>

I am in Ubuntu. Can you share template of your shell script {output to a file and copy the file to s3}. I can’t use ssh-agent as it involves windows workstations on-premises (outside aws). I tried to use it before but it’s a lot of overhead/un-reliable process.
