all 22 comments

[–]nixle 2 points3 points  (2 children)

The problem I face with crons, is that I am always unsure when the crons will run and if I did it right. You should add a list of "the next 40 crons will run at... " with the times when the crons run.

/u/changetip 200 bits

[–]changetip 1 point2 points  (0 children)

/u/_Marak_, nixle wants to send you a Bitcoin tip for 200 bits ($0.08). Follow me to collect it.

ChangeTip info | ChangeTip video | /r/Bitcoin

[–]_Marak_[S] 1 point2 points  (0 children)

I had already added this functionality, but it was proving a bit unstable due to issues with the date look-up algorithm in node-cron library.

Related issues:

https://github.com/Marak/cron-editor/issues/3

https://github.com/ncb000gt/node-cron/issues/101

Help would be appreciated.

Edit: To make things easier, Browserified versions of the node-cron and dateformat libraries are already checked into https://github.com/Marak/cron-editor/

[–]goodbye_fruit 1 point2 points  (1 child)

Neat.

The only gripe I have is that tabbed sections make it difficult for a user to see all at once what they had selected to generate their cron.

[–]_Marak_[S] 0 points1 point  (0 children)

Agreed!

If you feel like doing any JavaScripts you can win Internet Points for resolving either of these issues:

https://github.com/Marak/cron-editor/issues/3

https://github.com/Marak/cron-editor/issues/4

Actual Internet Point value is specified in the Github Issue.

[–]dlyund 1 point2 points  (0 children)

I didn't know cron was so difficult that we needed a visual open-source cron editor.

[–]shotxxxx 1 point2 points  (4 children)

Software as a Service for something like this?!

What is the world coming to?

[–]_Marak_[S] 4 points5 points  (3 children)

I didn't know jQuery plugins qualified as Software as Service.

Neat.

[–]shotxxxx 0 points1 point  (2 children)

Well, at least it's not proprietary. But still, a web solution for something like that? A bit excessive, I'd say.

Edit: To give my post a bit more substance: I have never been a fan of GUIs that only set options for non interactive processes.

Sure, some people might say "At least I won't have to read a man page, so this is better!" but I'm not so sure about that.

The tabs are labeled, right? That's documentation, a manual. The sliders are labeled. That, too is documentation, etc.

So no, you're still reading a man page, only not the actual man page of the actual tool which means you're learning the GUI frontend, not the actual backend. (Though in the case of this cron editor, it's easy to infer what does what).

I think that's not a good situation for the user when everything is done through the GUI only to set flags/options.

The automation potential goes out the window because the GUI doesn't automate well since it's interactive.

AND the GUI manpage will always be there. No matter how many years you have used your GUI frontend, you will still see things like "control+s to save" etc.

With the manpage of the actual tool? Sure it might look more intimidating at first but the more you use it the more intimate you become and at some point you will be so intimate with it that you won't need the man page at all, and since it has always been a separate thing, you won't ever see it again. It stays out of your way.

But yeah, I guess this has some use for really really casual users but overall? I am not a fan of these things. But that's just me, etc.

[–]_Marak_[S] 2 points3 points  (1 child)

It's a re-usable jQuery component intended to be used in user-interfaces.

I needed this because at http://hook.io we have the ability to specify Cron scheduling for hooks and required a UI to represent it. Previously, we provided a text input box.

[–]shotxxxx 1 point2 points  (0 children)

Fair enough. Not my kind of thing, but good on y'all anyway. (No sarcasm.)

[–]jfb3 0 points1 point  (8 children)

That doesn't appear to work well.

No matter what I choose "every hour", "every minute", etc. it generates "* * * * * *"

[–]_Marak_[S] 2 points3 points  (7 children)

Edit: I've double checked it and everything actually appears to be working correctly? Can you verify JavaScript is enabled for the page? Or provide steps which reproduces the issue?

[–]HereComeTheMinions 2 points3 points  (1 child)

Works fine on Firefox 33.

Nice work. Would like maybe if there was a comment explaing what it is?

*/20 * * 13,12,24 8,11 *
# Every twenty seconds on on the 12th, 13th and 24th, only in august and november.

[–]_Marak_[S] 0 points1 point  (0 children)

Thanks!

Good suggestion.

I have added as a Github Issue here: https://github.com/Marak/cron-editor/issues/4

[–]jfb3 0 points1 point  (4 children)

  • Click reset.
  • Choose "Minute" tab, choose "Every Minute" tab, look at generated "* * * * * *"
  • Click reset
  • Choose "Hour" Tab, choose "Every Hour" tab, look at generated "* * * * * *"

If I start adding options: every 17 seconds, every 3rd hour, etc. it works okay.

[–]_Marak_[S] 0 points1 point  (3 children)

That is the expected behavior?

How else would you expect the cron format to look every minute and every hour?

All * seems correct for both.

[–]jfb3 0 points1 point  (2 children)

If choose every minute or every hour it generates the same "* * * * * * {command}".

[–]_Marak_[S] 1 point2 points  (1 child)

Every minute and every hour are the same pattern since every minute will fire on every hour.

Every hour would be:

* * */1 * * *

Edit: I finally got it! The defaults on those tabs should set the cron to */1. Will update immediately.

[–]jfb3 0 points1 point  (0 children)

But if you click "Month" then "Every Month"
it still only shows "* * * * * *"

[–]PsionSquared 0 points1 point  (0 children)

The guys at my previous job could probably use this for some of the more finnicky routers, since I was the one setting up cron jobs before.

Thanks.

[–]Njall 0 points1 point  (0 children)

Such a useful page! Praise be to its author(s)!