phpScheduleIt / Booked Scheduler - Time slots layout issue - scheduler

Hoping someone can shed some light on this.
I'm trying to setup a schedule with 15 minute time slots (or any time slots for that matter).
Whenever I try and insert the following slot configuration I'm presented with this warning - 'Slots must be provided for all 24 hours of the day beginning and ending at 12:00 AM.'
Time slots:
Reservable:
07:00 - 07:30
07:30 - 08:00
08:00 - 08:30
08:30 - 09:00
09:00 - 09:30
09:30 - 10:00
10:00 - 10:30
10:30 - 11:00
11:00 - 11:30
11:30 - 12:00
12:00 - 12:30
12:30 - 13:00
13:00 - 13:30
13:30 - 14:00
14:00 - 14:30
14:30 - 15:00
15:00 - 15:30
15:30 - 16:00
16:00 - 16:30
16:30 - 17:00
17:00 - 17:30
17:30 - 18:00
18:00 - 18:30
18:30 - 19:00
19:00 - 19:30
19:30 - 20:00
20:00 - 20:30
Blocked
06:30 - 07:00
20:30 - 21:00
Any input will be appreciated.
Thank you

looks like you missed a slot. You need to cover all 24 hours. In blocked you would need to enter 20:30 - 07:00 or if that doesn't work, try 20:30 - 00:00 and 00:00 - 07:00.
Good luck!

Judou !
ooks like you missed a slot. You need to cover all 24 hours. In blocked you would need to enter 20:30 - 07:00 or if that doesn't work, try 20:30 - 00:00 and 00:00 - 07:00.

Related

Azure Data Factory - Triggers

I want to achieve below requirement -
Say I have a trigger named RunBatchJob
Weekdays: Monday - Friday
I want to schedule this trigger to run on below times:
Recurrence -> Every 5 Minutes between 06:00AM until 10:00 PM
Recurrence -> Every 30 Minutes between 10:01 PM until 05:59 AM
Weekends: Saturday, Sunday
I want to schedule this trigger to run on below times:
Recurrence -> Every 10 Minutes between 06:00AM until 10:00 PM
Recurrence -> Every 1 Hour between 10:01 PM until 05:59 AM
This used to be particularly easy on SQL server jobs, can anyone please advise me how to do it on ADF?
You can separate the triggers into 4 cases. Use a scheduled trigger for 1 week occurrence. Then you can enumerate all the combinations of trigger times in each trigger.
Here is the example for the 1st case(Mon-Fri Every 5 Minutes between 06:00 AM until 10:00 PM)
You can just repeat the idea for 2nd case(Mon-Fri Every 30 Minutes between 10:01 PM until 05:59 PM)

Duration of each status PostgreSQL

I have a table that has a couple of statuses for each ticket - e.g:
OPENED
CLOSED
RE-OPENED
FINISHED
REJECTED
...
And each row in the status table has the timestamp of when a status was set / changed, something like this:
time
status
2021-11-22 09:40
OPENED
2021-11-22 09:50
CLOSED
2021-11-22 10:10
RE-OPENED
2021-11-22 10:30
FINISHED
2021-11-22 10:50
CLOSED
2021-11-22 11:30
RE-OPENED
2021-11-22 12:10
REJECTED
What I am interested in, is how to calculate the duration of each status in a time range?
Time range can be anything from one hour to a couple of days. Let's use an example and try to calculate the duration for each status between
2021-11-22 10:00 - 2021-11-22 11:00
If we take a look into the table:
time
status
2021-11-22 09:50
CLOSED
2021-11-22 10:10
RE-OPENED
2021-11-22 10:30
FINISHED
2021-11-22 10:50
CLOSED
2021-11-22 11:30
RE-OPENED
10:00 - 10:10 --> CLOSED
10:10 - 10:30 --> RE-OPENED
10:30 - 10:50 --> FINISHED
10:50 - 11:00 --> CLOSED
The result table would look something like this:
status
duration
OPENED
00:00
CLOSED
00:20
RE-OPENED
00:20
REJECTED
00:00
FINISHED
00:20
P.S. As you can see, even though the first appearance of a status entry in the time range (10:00 - 11:00) was at 10:10, we have to include last reported status before the selected/desired time-range.
I appreciate the help.
You can use LEAD() to calculate time difference for rows which meet the time range condition. Then sum the time difference as duration. This is helpful when your time range spans a couple of hours or days.
WITH calc_table AS (
SELECT *, LEAD(CASE WHEN t1.time between
'2021-11-22 10:00' AND '2021-11-22 11:00'
THEN t1.time END) OVER (Order by t1.time) - t1.time as timediff
FROM mytable t1
)
SELECT DISTINCT c.status,
SUM(CASE WHEN c.timediff IS NOT NULL THEN c.timediff ELSE '00:00:00' END) AS duration
FROM calc_table c
GROUP BY c.status;
See the Demo

Formatting datetime in powershell script

I'm reading time into a variable from a CSV file but some of the time like 9 am is written as 9:00 instead of 09:00. How can I correct it into HH: mm format?
This should do the trick:
('9:00' -as [datetime]).ToString('HH:mm')
You can see it working on a loop from 0:00 to 12:00 with this:
PS /~> 0..12|%{("$_`:00" -as [datetime]).ToString('HH:mm')}
00:00
01:00
02:00
03:00
04:00
05:00
06:00
07:00
08:00
09:00
10:00
11:00
12:00

Check opening hours in different timezones

My Specs:
Postgres 9.6.6, latest Ubuntu LTS
Server Timezone is GMT
A table with two columns that shows store opening and closing times, with each timezone.
Here's the table:
ShopId OpenAt CloseAt
1 09:00:00 -08 17:00:00 -08
2 09:30:00 -05 17:30:00 -05
3 08:00:00 -11 15:00:00 -11
4 10:00:00 +07 15:30:00 +07
What I need to know is if at moment (at my current GMT time), the shop is open. Taking into consideration that Saturday and Sunday it's closed.
I'm digging around and I got something like:
SELECT ((OpenAt,CloseAt) OVERLAPS(NOW())) AND ISODOW < 6
with no luck...
Thanks
Perez
Try this :
SELECT ((date_trunc('day',nowAtShopLocation)+"OpenAt"::time, date_trunc('day',nowAtShopLocation)+"CloseAt"::time) OVERLAPS(nowAtShopLocation,nowAtShopLocation)) and EXTRACT (ISODOW FROM nowAtShopLocation) <6
from (
select *,now() AT TIME ZONE 'UTC'+(EXTRACT(TIMEZONE_HOUR FROM "OpenAt")||' hour')::interval nowAtShopLocation from your_table
) a

FQL and business hours

I'm querying information from a Facebook page for a small business using FQL and I'm trying to parse the business hours. The numbers I am getting back seem to represent seconds but I'm not sure when the epoch is. Wednesday and Thursday are the most confusing - open on Thursday is "57600" which would be 16 hours in seconds which would make 4pm Wednesday the epoch, but the closing hours on Wednesday - far past 4- are in the 600,000+ range.
Mon: 8:15am-12pm and 1pm - 5pm Tue: 8am-12pm and 1pm - 5pm Wed: 8am-12pm and 1pm - 9pm Thur:8am-12pm and 1pm - 5pm Fri:8am-12pm and 1pm - 5pm Sat:8am-12pm and 1pm - 5pm
<hours>
<mon_1_open>404100</mon_1_open>
<mon_1_close>417600</mon_1_close>
<tue_1_open>489600</tue_1_open>
<tue_1_close>504000</tue_1_close>
<wed_1_open>576000</wed_1_open>
<wed_1_close>590400</wed_1_close>
<thu_1_open>57600</thu_1_open>
<thu_1_close>72000</thu_1_close>
<fri_1_open>144000</fri_1_open>
<fri_1_close>158400</fri_1_close>
<sat_1_open>230400</sat_1_open>
<sat_1_close>244800</sat_1_close>
<sun_1_open>0</sun_1_open>
<sun_1_close>0</sun_1_close>
<mon_2_open>421200</mon_2_open>
<mon_2_close>435600</mon_2_close>
<tue_2_open>507600</tue_2_open>
<tue_2_close>522000</tue_2_close>
<wed_2_open>594000</wed_2_open>
<wed_2_close>622800</wed_2_close>
<thu_2_open>75600</thu_2_open>
<thu_2_close>90000</thu_2_close>
<fri_2_open>162000</fri_2_open>
<fri_2_close>176400</fri_2_close>
<sat_2_open>248400</sat_2_open>
<sat_2_close>262800</sat_2_close>
<sun_2_open>0</sun_2_open>
<sun_2_close>0</sun_2_close>
</hours>
If I change it to simply 8am-5pm Monday to Saturday I get an equally confusing response from FB
<hours>
<mon_1_open>403200</mon_1_open>
<mon_1_close>435600</mon_1_close>
<tue_1_open>489600</tue_1_open>
<tue_1_close>522000</tue_1_close>
<wed_1_open>576000</wed_1_open>
<wed_1_close>608400</wed_1_close>
<thu_1_open>57600</thu_1_open>
<thu_1_close>90000</thu_1_close>
<fri_1_open>144000</fri_1_open>
<fri_1_close>176400</fri_1_close>
<sat_1_open>230400</sat_1_open>
<sat_1_close>262800</sat_1_close>
<sun_1_open>0</sun_1_open>
<sun_1_close>0</sun_1_close>
<mon_2_open>0</mon_2_open>
<mon_2_close>0</mon_2_close>
<tue_2_open>0</tue_2_open>
<tue_2_close>0</tue_2_close>
<wed_2_open>0</wed_2_open>
<wed_2_close>0</wed_2_close>
<thu_2_open>0</thu_2_open>
<thu_2_close>0</thu_2_close>
<fri_2_open>0</fri_2_open>
<fri_2_close>0</fri_2_close>
<sat_2_open>0</sat_2_open>
<sat_2_close>0</sat_2_close>
<sun_2_open>0</sun_2_open>
<sun_2_close>0</sun_2_close>
</hours>
Am I missing some defacto standard time representation? How would someone go about parsing this as a legitimate time of day?
The Unix epoch is the time 00:00:00 UTC on 1 January 1970. Any time you see the term "epoch" used in relation to computer-based time, that's usually what it means.
In UTC, 404100 is Mon, 05 Jan 1970 16:15:00 GMT. Or, in the PST timezone, Mon, 05 Jan 1970 08:15:00 PST, which is the time you're expecting. Ignore the date; it's irrelevant, anyways.
You can test what I'm describing using this Epoch Converter.