Coder Social home page Coder Social logo

recurring_tasks's Introduction

Recurring tasks

Build and Test

This project sends reminders to myself on a schedule.

How this works

This repo works using a counterpart private repository. This repository's concern is related to finding upcoming tasks given a task file of a specific format.

The counterpart private repository will use this repository, but it's concerns are related to periodically running and notifying someone..

Running tests

cargo test

Running the program

cargo run -- --tasks tasks/example.toml

This will output a body.md, body.html and a subject.txt. This files are then used for sending emails.

recurring_tasks's People

Contributors

hockeybuggy avatar

Watchers

 avatar  avatar

recurring_tasks's Issues

Have the program write files

Currently the program runs and outputs via stdout (the script's output is redirected to a file and than that file is read by the send mail script).

An alternative would be to write 3 files with the script.

  • output.subject.txt
  • output.md
  • output.html

The subject line is currently done within JS land, but that means that it has to know some things about date times which means there is rust date stuff and JS date stuff and ideally there would only be one.

The output.md would pretty much just be what is currently there, but it means that I can use some links and things that the current "really just text" format would not allow.

Lastly the output.html file would be generated from the output.md file. It think it's very likely that this could/should be a seperate program that runs within the send-email workflow.

Make the tasks file syntax a little nicer

For this I was thinking something like:

timezone = "America/Toronto"

[tasks]
[tasks.water]
name = "Drink water (min 1 litre)"
cron_expression = '0 0 * * * * *'

[tasks.teeth]
name = "Brush teeth"
cron_expression = '0 0 * * * * *'


[birthdays]
[birthdays.falin]
name = "Falin's birthday"
cron_expression = '* 0 0 2 2 * * *'

[birthdays.kim]
name = "Kim's Birthday"
cron_expression = '* 0 0 2 2 * * *'

Use authenticated email domain

I setup a more complicated version of the domain verification with sendgrid. I don't know if the emails are gonna use this or if I have to change the "from" in the send email workflow.

Take a list of tasks as a file

Having tasks in an input file means that the scheduled task could use a prebuilt binary. It could also make it easier to publish an example project and keep my private things private.

Add "update book list" task

I have an AirTable document for books I have read. It needs to be updated occasionally.

Maybe once a month?

Add timezone support

GitHub's cron in always UTC, but it will be easiest to work on tasks on an "local time" basis.

Round down to the start of the day

Right now the cron is running once a day early in the morning. This means that it's currently picking up beteween2020-06-16T04:10:18.505685508EDT and 2020-06-17T04:10:18.505685508EDT. We should drop everything except the date component. This should happen after converting to local time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.