yark icon indicating copy to clipboard operation
yark copied to clipboard

Scheduling

Open Owez opened this issue 3 years ago • 3 comments

This project needs to have some sort of scheduling integrated.

Options

These options are cross-platform and they need to work on Windows, Mac, and Linux.

  • Simple thread.sleep()
  • Look into https://docs.python.org/3/library/sched.html
  • Look into https://schedule.readthedocs.io/en/stable/

Owez avatar Aug 22 '22 11:08 Owez

The CLI for this will most likely be yark refresh [archive] --schedule=1d with 1d here being a human date which it runs. 1d = daily, 1w = weekly, etc. I know there's a nice library to parse these dates to make it so people already know how they work.

This is also required for the big possible #83 command, and will be aliased there so it needs to be a repeatable argument.

Owez avatar Jan 12 '23 23:01 Owez

just wondering - whats the difference between doing this and using cron? i feel like keeping the scheduling job outside of yark would make it more "unix principle-ey" and enable others to use other kinds of schedulers

swyxio avatar Jan 18 '23 11:01 swyxio

just wondering - whats the difference between doing this and using cron? i feel like keeping the scheduling job outside of yark would make it more "unix principle-ey" and enable others to use other kinds of schedulers

This feature would be a simple in-built scheduler so that users can use the application without needing to learn a scheduling tool on their local os (Yark is cross-platform and supports Windows too). If you want to use cron or another scheduler after this issue is implemented, you can still use refresh as the scheduler would just run this command.

Owez avatar Jan 18 '23 12:01 Owez