Metadata-Version: 2.4
Name: pyschtasks
Version: 0.1.0
Summary: Schtasks api in windows
Home-page: https://github.com/sukhbinder/pyschetaks
Author: sukhbinder
Author-email: sukh2010@yahoo.com
License: Private
Keywords: schtasks,windows,schedule,computer,api
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: dateutils
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: summary

# pyschtasks

[![PyPI](https://img.shields.io/pypi/v/pyschtasks.svg)](https://pypi.org/project/pyschtasks/)
[![Changelog](https://img.shields.io/github/v/release/sukhbinder/pyschtasks?include_prereleases&label=changelog)](https://github.com/sukhbinder/pyschtasks/releases)
[![Tests](https://github.com/sukhbinder/pyschtasks/actions/workflows/test.yml/badge.svg)](https://github.com/sukhbinder/pyschtasks/actions/workflows/test.yml)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/sukhbinder/pyschtasks/blob/master/LICENSE)



A simplified api to call/schedule tasks in windows using `schtasks`

# Install
`pip install pyschtasks`

# Usage

Here's how to schedule a a task to run a command:

```python
import stask

# Schedule a one time job for 6:30 pm today
job = stask.Job("test_task")
job.do("calc.exe").at("6:30pm").post()

# Schedule a job to run daily at 8:00 AM
job = stask.Job("daily_task")
job.do("notepad.exe").at("8am").daily().post()

# Schedule a job for every 10 minutes
job = stask.Job("every_10_min")
job.do("explorer.exe").every(10).minute().post()

# Delete a scheduled task
job = stask.Job("test_task")
job.delete()

# Run a scheduled task
job = stask.Job("daily_task")
job.run()

# List a scheduled task
job = stask.Job("daily_task")
job.list()
```

# CLI Usage

You can also use `pyschtasks` from the command line:

## Create a task

```bash
stask create -n my_task -c "notepad.exe" -s DAILY -a "09:00"
```

## Delete a task

```bash
stask delete -n my_task
```

## List a task

```bash
stask list -n my_task
```
