Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HWORKS-791] Add Python API support to schedule jobs #176

Merged
merged 4 commits into from
Oct 16, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix doc string
  • Loading branch information
SirOibaf committed Oct 16, 2023
commit cb511f6480e37b58fc3dcabe73975fcf205f20d4
11 changes: 4 additions & 7 deletions python/hopsworks/job.py
Original file line number Diff line number Diff line change
@@ -193,7 +193,7 @@ def delete(self):
"""
self._job_api._delete(self)

def schedule(self, cron_expression, start_time=None, end_time=None):
def schedule(self, cron_expression: str, start_time: datetime = None, end_time: datetime = None):
"""Schedule the execution of the job.

If a schedule for this job already exists, the method updates it.
@@ -210,12 +210,9 @@ def schedule(self, cron_expression, start_time=None, end_time=None):
```

# Arguments
cron_expression: str. The quartz cron expression
start_time: datetime, optional. The schedule start time in UTC.
If None, the current time is used. The start_time can be a value in the past.
end_time: datetime, optional. The schedule end time in UTC.
If None, the schedule will continue running indefinitely.
The end_time can be a value in the past.
cron_expression: The quartz cron expression
start_time: The schedule start time in UTC. If None, the current time is used. The start_time can be a value in the past.
end_time: The schedule end time in UTC. If None, the schedule will continue running indefinitely. The end_time can be a value in the past.
# Returns
`JobSchedule`. The schedule of the job
"""
Loading