Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.
/ aws-ec2-scheduler Public archive

Scheduler to launch and shutdown AWS EC2 instances on a regular basis

Notifications You must be signed in to change notification settings

brujeo/aws-ec2-scheduler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws-ec2-scheduler

Scheduler to launch and shutdown AWS EC2 instances on a regular basis

Installing

if you have composer installed globally, just run

composer install

otherwise get composer from https://getcomposer.org/download/

Configuration

copy config/settings.yml.dist file to config/settings.yml and set aws_key, aws_secret and aws_region

Scheduling EC2 instance start and shutdown

Edit config/schedule.yml file and set your schedules.

Sample schedule job

test001_job:
    instance_id: i-941d5871
    start: "30 8 * * *"
    shutdown: "30 17 * * *"

Schedule string format

*    *    *    *    *    *
-    -    -    -    -    -
|    |    |    |    |    |
|    |    |    |    |    + year [optional]
|    |    |    |    +----- day of week (0 - 7) (Sunday=0 or 7)
|    |    |    +---------- month (1 - 12)
|    |    +--------------- day of month (1 - 31)
|    +-------------------- hour (0 - 23)
+------------------------- min (0 - 59)

Running scheduled tasks

Add the following to your Crontab (crontab -e):

* * * * * php /path/to/aws-ec2-scheduler/scheduler.cron.php > /dev/null 2>&1

About

Scheduler to launch and shutdown AWS EC2 instances on a regular basis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages