summaryrefslogtreecommitdiff
path: root/internal/task/task.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/task/task.go')
-rw-r--r--internal/task/task.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/internal/task/task.go b/internal/task/task.go
index 67cb677..20a4f48 100644
--- a/internal/task/task.go
+++ b/internal/task/task.go
@@ -88,6 +88,16 @@ func SetStatus(id int, status string) error {
return run(strconv.Itoa(id), "modify", "status:"+status)
}
+// Start begins the task with the given id.
+func Start(id int) error {
+ return run(strconv.Itoa(id), "start")
+}
+
+// Stop stops the task with the given id.
+func Stop(id int) error {
+ return run(strconv.Itoa(id), "stop")
+}
+
// SetPriority changes the priority of the task with the given id.
func SetPriority(id int, priority string) error {
return run(strconv.Itoa(id), "modify", "priority:"+priority)