Merge pull request #5 from car-da/scheduling

aded scheduling options for backup client in rsync engine
diff --git a/README.rst b/README.rst
index 92e30e9..987e654 100644
--- a/README.rst
+++ b/README.rst
@@ -141,6 +141,43 @@
         target:
           engine: local
 
+
+Client scheduling in rsync engine
+=================================
+
+Client run backup at 5am every day.
+
+.. code-block:: yaml
+
+    backupninja:
+      client:
+        enabled: true
+        target:
+          engine: rsync
+        scheduling:
+          when:
+            - everyday at 05
+
+
+Client run backup in mupltiple times.
+
+.. code-block:: yaml
+
+    backupninja:
+      client:
+        enabled: true
+        target:
+          engine: rsync
+        scheduling:
+          when:
+            - everyday at 5
+            - Tuesday at 05:30
+            - 25 at 23:45
+            - hourly
+
+If multiple "when" options are present, then they all apply. If two configurations files are scheduled to run in the same hour, then we fall back on the alphabetical ordering specified above.
+
+
 More information
 ================
 
diff --git a/backupninja/files/dup.conf b/backupninja/files/dup.conf
index f7d2537..8ace4ec 100644
--- a/backupninja/files/dup.conf
+++ b/backupninja/files/dup.conf
@@ -7,6 +7,16 @@
 ## necessary. Options which are uncommented in this example do not have
 ## defaults, and the settings provided are recommended.
 
+#scheduling
+##by default it is
+##when = everyday at 01
+{%- if client.scheduling is defined %}
+{%- for time in client.scheduling.when %}
+when = {{ time }}
+{%- endfor %}
+{%- endif %}
+
+
 ## passed directly to duplicity, e.g. to increase verbosity set this to:
 ## options = --verbosity 8
 ## when using the Amazon S3 backend to create buckets in Europe:
diff --git a/backupninja/files/rdiff.conf b/backupninja/files/rdiff.conf
index 63e347d..a2f49dd 100644
--- a/backupninja/files/rdiff.conf
+++ b/backupninja/files/rdiff.conf
@@ -13,6 +13,16 @@
 ## destination host and user.
 ##
 
+#scheduling
+##by default it is
+##when = everyday at 01
+{%- if client.scheduling is defined %}
+{%- for time in client.scheduling.when %}
+when = {{ time }}
+{%- endfor %}
+{%- endif %}
+
+
 ## passed directly to rdiff-backup
 ## an example setting would be:
 ## options = --force
diff --git a/backupninja/files/rsync.conf b/backupninja/files/rsync.conf
index 19b5c26..e045ab3 100644
--- a/backupninja/files/rsync.conf
+++ b/backupninja/files/rsync.conf
@@ -5,6 +5,16 @@
 # rsync handler file
 #
 
+#scheduling
+#by default it is
+#when = everyday at 01
+{%- if client.scheduling is defined %}
+{%- for time in client.scheduling.when %}
+when = {{ time }}
+{%- endfor %}
+{%- endif %}
+
+
 [general]
 
 # rsync log file