Hi can someone help me in creating a quartz expression which triggers every 120 min 7 days a week? - quartz-scheduler

Hi can someone help me in creating a quartz expression which triggers every 120 min 7 days a week?I tried something like <0 0/120 * * * ?* MON-SUN>
but its not working.

Minutes go up to 60 so you can't have an interval of 120. 120 minutes is two hours so you want
0 0 0/2 * * ?

Related

Convert hours:minutes to seconds where hours > 24

I have a string 47:45.
That means 47 hours, 45 minutes.
I want to convert that string to seconds.
select datediff(second, '00:00','47:45') <-- does not work
what is the quickest way to find the 171.900 seconds I am looking for?
One way to do this would by delimiting the semicolon separated values and multiplying the minutes part by 60 and hours by 3600 and adding the result.
Thanks!

Influx - How to get time division data when data reset to 0

I using Grafana and influxdb to collect ‘product data’ in the assembly line. I make a chat by grafana to show how many products was done in every hour.
It works good, but i have one problem, sometimes the worker will clear the total count because of shifts change. this cause the division data less than 0.
Considering this serial data(each data 10 minutes):
100 200 300 400 0 10 20
the correct time divisional value in this hour should be (400-100) + (20-0) = 320
I tried also search but no help, do you have any ideas? (Sperate to 2 time divisions when data set to 0 is also OK , in this sample, we can get two bars with 300 and 20)
Thanks a lot!
Use different approach with subqueries:
1.) Inner query will calculate diff between each record with NON_NEGATIVE_DIFFERENCE()
-> 100 100 100 0 10 10
2.) Outer query will just SUM() result of inner query and group it per hour -> 320

Hour conversion in Tableau

I have a data-set that has time (hours) data in it.
The time data is given as 0.1123, 3.1565, 0.2951 etc (all in hours).
How do I convert it into standard hours and minute format?
We can achieve this using two methods
1.Change to Date & Time
Once the data has been imported in Tableau. Change the data type of the column to "Date & Time". Tableau data engine automatically understand the time format and change the decimal time to Actual time
Refer this Image
2. Using Calculated Field "MAKETIME"
MAKETIME Requires three argument(hour, minute, second).Below code parse decimal number "3.1545" as
3 hrs, 9 min (0.15*60) and 16 sec (0.0045*3600)
MAKETIME(INT([DecimalTime]),
int(INT(([DecimalTime]100)%100).6),
int(INT(([DecimalTime]10000)%100).36))
Floor([value]) = the number of hours
Floor([value] * 60) % 60 = the number of minutes
Floor([value] * 3600) % 3600 = the number of seconds

How to calculate fraction in datediff function in Tableau

I am not really an expert in Tableau. I have a need to calculate a timedifference in hours, but also want to see fraction of an hour. I am using Tableau 9.
I used the function
IF DATEDIFF("hour", [CL2_Start_Time_ST], [CL2_End_Time_ST]) > 8 then NULL
ELSE DATEDIFF("hour", [CL2_Start_Time_ST], [CL2_End_Time_ST])
END
If the time difference between CL2_Start_Time_ST and CL2_End_Time_ST is less than 1 hour (for example 30 minutes) the result is 0, but I want to see 0.5 in result.
I dont want to calculate in time difference in minutes since all my other calculations are in hours and hence it is easier to create a relative plot with other calculations.
Please help.
I found the answer to the above question. The simple formula below worked. I was using DIV function and that caused the issue.
IF DATEDIFF("hour", [CL2_Start_Time_ST], [CL2_End_Time_ST]) > 8 then NULL
ELSE (DATEDIFF("minute", [CL2_Start_Time_ST], [CL2_End_Time_ST])) / 60
END

How to convert Number of hours into number of work-hours days in postgreSql?

i have a column which has data in "12:19:04" this format.
i.e 12 hours 19 min and 4 sec.
i want to convert this into number of days considering working hours as one day i.e 10 hr
so the above time should be displayed as 1 day 2 hr 19 min and 4 sec
and also if the hours value is too huge then month days hours and minutes should be displayed.
Kindly help me in this.
Easiest way: Use epoch time, divide by 10 days in seconds, convert remainder back to seconds.
WITH s(secs) AS (SELECT extract(epoch from interval '12:19:04'))
SELECT justify_interval(
floor(secs / 36000) * INTERVAL '1' DAY
+ (secs::integer % 36000) * INTERVAL '1' SECOND
) FROM s;