-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Way to specify when a job runs only on weekdays #2
Comments
Hi, Glad you find it useful :-). I'd thought about adding a feature for 'erratic' scheduled jobs - ones that maybe run on say monday morning and friday afternoon - but I couldn't really think of a decent UI that didn't end up getting quite complicated. I toyed with the idea of a 'this only runs at weekends|weekdays' toggle but I could then see adding extra options for 'only runs on leap years', 'only runs the first week of the month' etc and ending up with 100 different toggle buttons to cover all the cases. The only way to do it (and it would be nasty) in the current version would be to have your job ping a seperate url for each day. So you'd end up with five 'weekly' entries for one actual cron job - which isn't very nice :-/ Now that you've brought it back into my head - I might have another think about it though. I've got some time over Xmas so I might do some work on it as there are some other things I'd like it to do as well. If you've got any ideas for a UI that would cover 'unusual' cases let me know though! :-) |
The first thing that comes to my mind that could simplify the UI is to allow the user to enter a cron expression( |
Ah - yeah. That was actually how it originally worked when it was just me using it - but when I started letting other people edit the jobs (mostly non-unix people) they got a bit confused trying to figure it out and I kept getting complaints that cronmon was 'getting it wrong' :-/ So I simplified it to the current 'plain language' input. I might have a look again though and see if there's a nice way I can do an 'either / or' on the format you choose without making the internals too 'if/else - if/else - if/else' spaghetti :-) |
Hi again, @jcalonso :-) I've added in the ability to set the schedules via a cron expression - I think it works right ;-) See if you can give it a try. The UI isn't great for it - but I'm on holiday so I'm being lazy ;-) |
Sweeetttt!! Let me give it a try and I will let you know! Thanks for implementing this! |
No worries - let me know how you get on :-) I've only done a minimal amount of testing and I think there are some edge-cases I haven't really trapped - but unless you need 'to-the-minute' alerting I think it should be ok. Probably.. ;-) |
Just to confirm that jobs using cron expressions works fine 👍 |
Oh - glad it works ok! :-) The only thing I can really think of to add to the project might be some sort of API to create a job via a POST rather than using the UI. And maybe in reverse some way of getting data about a job via a GET - which might be handy for some other monitoring (like an automated alert if the 'ping data' value shows up something unexpected). I think a simple UI to create an API key for the user - then just have It's been on my 'todo list' for about a year ;-) |
Nice!, I see a couple of features here:
1) A Rest API: Starting simple, just allowing to create, and listing jobs
with their current status.
2) Simple authentication for the API using Bearer Auth (Tokens)
3) Improvements to the alerting system: Currently only supports email, but
this could be expanded to allow other platforms like Slack and/or Webhooks.
Let me know what you think
…On Wed, Dec 26, 2018 at 12:37 PM ohnotnow ***@***.***> wrote:
Oh - glad it works ok! :-)
The only thing I can really think of to add to the project might be some
sort of API to create a job via a POST rather than using the UI. And maybe
in reverse some way of getting data about a job via a GET - which might be
handy for some other monitoring (like an automated alert if the 'ping data'
value shows up something unexpected).
I think a simple UI to create an API key for the user - then just have POST
/api/v1/job with some data to create a cronjob, and a GET
/api/v1/job/job-uuid both wrapped in a middleware that checks the API key
and creates/returns the data.
It's been on my 'todo list' for about a year ;-)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAojmkwEkTuIyoeQocQd0PrIf74iEt9Dks5u821sgaJpZM4X92mU>
.
--
Juan Carlos Alonso Durán
|
@jcalonso yep - 1 & 2 were my initial thoughts - 3) would be really nice too. When I first wrote it I didn't really use any 3rd party things like slack so it never really appealed to me - but it would be a nice addition, especially now that Laravel has pretty straightforward support baked in :-) |
Hi there!, this is a very useful tool!, I've been using it to monitor scheduled jobs from other Laravel apps and multiple scripts I have. One thing I haven't been able to do is to monitor jobs that run only on weekdays (w/o having to set up a grace period of 2 days).
Is there a way to do this?
Edit:
I'm on version
1.1.0
The text was updated successfully, but these errors were encountered: