diff --git a/one/jobs/__init__.py b/one/jobs/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/one/jobs/__init__.py diff --git a/one/jobs/daily/__init__.py b/one/jobs/daily/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/one/jobs/daily/__init__.py diff --git a/one/jobs/hourly/__init__.py b/one/jobs/hourly/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/one/jobs/hourly/__init__.py diff --git a/one/jobs/hourly/scheduled_vm_cleanup.py b/one/jobs/hourly/scheduled_vm_cleanup.py new file mode 100644 index 0000000..1f51710 --- /dev/null +++ b/one/jobs/hourly/scheduled_vm_cleanup.py @@ -0,0 +1,8 @@ +from django_extensions.management.jobs import HourlyJob + +class Job(HourlyJob): + help = "Suspend/delete expired Instances." + + def execute(self): + # executing empty sample job TODO + pass diff --git a/one/jobs/hourly/update.py b/one/jobs/hourly/update.py new file mode 100644 index 0000000..7e403ef --- /dev/null +++ b/one/jobs/hourly/update.py @@ -0,0 +1,10 @@ +from one.models import * +from django_extensions.management.jobs import HourlyJob + +class Job(HourlyJob): + help = "Update Disks and Networks from OpenNebula." + + def execute(self): + Disk.update() + Network.update() + pass diff --git a/one/jobs/monthly/__init__.py b/one/jobs/monthly/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/one/jobs/monthly/__init__.py diff --git a/one/jobs/weekly/__init__.py b/one/jobs/weekly/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/one/jobs/weekly/__init__.py diff --git a/one/jobs/yearly/__init__.py b/one/jobs/yearly/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/one/jobs/yearly/__init__.py