neo-project / neo-modules

MIT License
60 stars 100 forks source link

Added Crontab job plugin #834

Closed cschuchardt88 closed 10 months ago

cschuchardt88 commented 11 months ago

Crontab-logo

*    *    *    *    *       Crontab Expression Chart
│    │    │    │    │
│    │    │    │    │
│    │    │    │    |_________ Day of Week (0 – 6) (0 is Sunday)
│    │    │    |____________ Month (1 – 12), * means every month
│    │    |______________ Day of Month (1 – 31), * means every day
│    |________________ Hour (0 – 23), * means every hour
|___________________ Minute (0 – 59), * means every minute

Workaround for https://github.com/neo-project/neo/issues/2903

neo-cron-plugin

Task scheduler for sending transactions to the blockchain. Just as the name implies Crontab does just that! Schedule jobs to invoke contracts or transfer funds at certain times of the day, month, year, hour and minute.

Features

image

Example Tasks

You can find more details on how to create and configure jobs here.

Schedule Job Examples

cschuchardt88 commented 11 months ago

If this is something we are going to use for temporary workaround, until we implement https://github.com/neo-project/neo/issues/2903. I have problem. Github Actions not picking up new tests i added. how to add one?

I see

https://github.com/neo-project/neo-modules/blob/6ead78007ba6003eb050f7c7bffeb4e2476f348e/.github/workflows/main.yml#L24-L32

But i don't know which paths i need or if I'm in the right spot. Never used coverlet.

shargon commented 11 months ago

With RPC you can already send task with crontab, why we need to replicate it?

cschuchardt88 commented 11 months ago

With RPC you can already send task with crontab, why we need to replicate it?

You mean talking to website? I'm sure windows doesn't have anything built-in?

This has better security than using a side channels. You can think of it as github actions. This is just a base of what is to come of this service. Idea is to expand the cli not to limit it for non-technical users.

Jim8y commented 10 months ago

With RPC you can already send task with crontab, why we need to replicate it?

Dude, isn't this plugin? why can not we have many plugins here, its like a tool box, users pick which one they want, right?

cschuchardt88 commented 10 months ago

It would take a year before it gets added, if interested, you can always go to my personal repos. It a collection of what neo should be doing or needs. https://github.com/cschuchardt88/neo-cron-plugin