diff --git a/app/notify_client/job_api_client.py b/app/notify_client/job_api_client.py index 046ab4b9d..ea545b508 100644 --- a/app/notify_client/job_api_client.py +++ b/app/notify_client/job_api_client.py @@ -49,13 +49,17 @@ class JobApiClient(BaseAPIClient): return self.get(url='/service/{}/job'.format(service_id), params=params) - def create_job(self, job_id, service_id, template_id, original_file_name, notification_count): + def create_job(self, job_id, service_id, template_id, original_file_name, notification_count, scheduled_for=None): data = { "id": job_id, "template": template_id, "original_file_name": original_file_name, "notification_count": notification_count } + + if scheduled_for: + data.update({'scheduled_for': scheduled_for}) + data = _attach_current_user(data) job = self.post(url='/service/{}/job'.format(service_id), data=data)