This looks like schoolwork.
I am not sure I'd go for a script. If possible, I'd just take the easy route.
I'd use SSH, SCP, and cron.
In today's article, we're going to learn how to login to SSH to run one command. Yes, it's another SSH article! Read on to learn more!
linux-tips.us
In this article, you will learn how to transfer files over SSH by using 'scp'. If you need to transfer files over a network, this is one way to do so.
linux-tips.us
I do not yet have a cron article, but there are many of them.