rufus scheduler first monday every 3 months - rufus-scheduler

Is there a way to do rufus-scheduler for first monday every 3 months? Is it '0 0 * 3,6,9,12 first#1'? I am trying to use resque-scheduler. It seems to depend on rufus version 2.
Thanks!

rufus-scheduler 2.0 documentation is at https://github.com/jmettraux/rufus-scheduler/blob/two/README.rdoc
It should be "0 0 * 3,6,9,12 mon#1".

Related

Cron trigger did not correctly run in Spring

I am working on my Spring configuration, and I need a trigger that runs on the first of every month indefinitely.
I had "0 0 0 1 * ?" running, but it did not trigger when the time came. I can create a cron trigger for every minute, and it runs fine. So this issue strictly has to do with the cron trigger.
After looking through expression generators, "0 0 0 1 * *" seems to be the same expression? But it's painful because I have to wait for 3 weeks to know if it will work or not.

Spring Cron expression to exclude running job on one day for set times

I have a job that gets submitted every hour at 15 minutes past each hour via a Spring cron expression. A requirement has come up where this job is to not run at 12:15 am and 1:15 am on a Sunday morning.
My question is ... does cron support this kind of scenario where a job is to run every hour at 15 minutes past the hour except for 12:15 am and 1:15 am on a Sunday? Below is the expression that prevents it from running at 12:15 am and 1:15 am every day and it needs to be adjusted to only not run on Sunday at those times.
#Scheduled(cron = "0 15 2-23 * * ?")
Hopefully the above is clear. If not, please let me know and I will provide additional information.
Thank you in advance.
If it is wanted to run the job two specific days, it is possible to write the days together with comma.
Example: #Scheduled(cron = "0 15 2-23 * * SUN,MON)
Additionally, if you want to include all weekdays MON-FRI can be used:
Example: #Scheduled(cron = "0 15 2-23 * * MON-FRI)
Try
#Scheduled(cron = "0 15 2-23 * * SUN")

CRON: Run job on particular hours

I have a spring batch application and i am using CRON to set how often this application runs. But the problem i am running into is that i want to run the job on specific hours
3 am
7 am
11 am
3 pm
7 pm
11 pm
As you can see it is every 4 hours but starts at 3 am so i cannot use */4 in the hours section of the timing format as this would start the job at 4am
I have also tried '3,7,11,15,19,23' in the hours section but this does not work either (guessing it only works in the minutes section). Does someone know how i can do this?
Use
#Scedule(cron="0 0 3/4 * * ?")
The Pattern x/y means: where <timepart> mod y = x
or
#Scedule(cron="0 0 3,7,11,15,19,21 * * ?")
According to the Quartz Cron Trigger Tutorial:
The '/' character can be used to specify increments to values. For
example, if you put '0/15' in the Minutes field, it means 'every 15th
minute of the hour, starting at minute zero'. If you used '3/20' in
the Minutes field, it would mean 'every 20th minute of the hour,
starting at minute three' - or in other words it is the same as
specifying '3,23,43' in the Minutes field. Note the subtlety that
"/35" does *not mean "every 35 minutes" - it mean "every 35th minute
of the hour, starting at minute zero" - or in other words the same as
specifying '0,35'.
0 0 3,7,11,15,19,23 * * ?
Fires for 0 minute starting at 3am and ending at 23:00 pm every day.
judging by the two answers above the error i was making was i was keeping the apostrophe at the start and end of my hours... very silly
i managed to solve this by using 3-23/4 for the hour as this starts from 3am and then every other fourth hour (just a different way of doing it to the other answers)

spring cronsequencegenerator pattern for job that run on 9th, 16th, 23th and 30th of every month at 10 O'clock.

I am struggling with the spring cronsequencegenerator pattern for job that run on 9th, 16th, 23th and 30th of every month at 10 O'clock.
Please help.
Spring provides a solution
Go through the documentation of Scheduled annotation and you be able to solve your problem.
Assuming it's 10AM and not 22:00 basic cron exp for you would be
0 10 9,16,23,30 * *
As per documentation cron-like exp is needed
0 0 10 9,16,23,30 * * - with additional first field for seconds.
Depending on specification (implementation) of "cron-like" your needs could suit
0 0 10 9,16,23,30 * ? - with day of the week special symbol
0 0 10 9,16,23,30 * * * - with optional field for year filled in

Java - spring - quatrz cron expression

Java - spring - quatz shedular.
I am trying to write following 2 cron expressions
1- cron expression to execute every day once in early morning by 3AM.
2 -cron expression to execute every after 3 hours
help appriciated
following are expressions i assume will work but have to wait to see.
1- "0 0 0/1 * * ?"
2- "0 3 * * * ?"
1) does not make any sense to me.
2) run in the 3th minute of every hour
Your expressions are wrong. The first one runs every hour while the second runs on every 3rd minute of every hour.
To run every day at 3 AM:
0 0 3 * * ?
I don't understand your second requirement.

Resources