Azure Data Factory - Triggers - azure-data-factory

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)

Related

RUN Task Scheduler in different times

Is it possible to create TS (Windows Server 2012 R2) for below timings in everyday?
9:00, 15:00, 19:00 and 3:00
I have idea to create TS for every 6 hours in a day, but i have a 4 hours gap between 15:00 and 19:00.
any idea?
~~Ramesh

Quartz simple trigger vs cron trigger

For my enterprise application, i need do the batch operation with time of intervals.
While referring quartz scheduler, there are two types. One is simple trigger and another one is cron trigger.
I am confusing about these concepts. Please explain me with simple example.
Please refer to the examples given in the documentation.
CronTrigger
CronTrigger is often more useful than SimpleTrigger, if you need a job-firing schedule that recurs based on calendar-like notions, rather than on the exactly specified intervals of SimpleTrigger.
Some Examples
“every Friday at noon” or “every weekday and 9:30 am”, or even “every 5 minutes between 9:00 am and 10:00 am on every Monday, Wednesday and Friday during January”, .
CronTrigger Example 1 - an expression to create a trigger that simply fires every 5 minutes
“0 0/5 * * * ?”
CronTrigger Example 2 - an expression to create a trigger that fires every 5 minutes, at 10 seconds after the minute (i.e. 10:00:10 am, 10:05:10 am, etc.).
“10 0/5 * * * ?”
CronTrigger Example 3 - an expression to create a trigger that fires at 10:30, 11:30, 12:30, and 13:30, on every Wednesday and Friday.
“0 30 10-13 ? * WED,FRI”
CronTrigger Example 4 - an expression to create a trigger that fires every half hour between the hours of 8 am and 10 am on the 5th and 20th of every month. Note that the trigger will NOT fire at 10:00 am, just at 8:00, 8:30, 9:00 and 9:30
“0 0/30 8-9 5,20 * ?”

Date/Time range computaion in SSRS

I have sets of date/time range values, each set came from different column ("FROM" and "TO")
examples:
FROM: June 6, 2016 7:00 AM; TO: June 6, 2016 5:00 PM
FROM: June 6, 2016 8:00 PM; TO: June 7, 2016 6:00 AM
I want to get how many minutes of each set falls to 3:00 PM - 2:00 AM (next day) or "OFF PEAK HOURS", like this
for the example above, I want to get the number of minutes between 3PM - 2AM next day.
on the first row, from 7AM-5PM, two hours is included to my 3PM-2AM range criteria, which is 3PM-5PM (2 hours) . Thats why I got 120 mins.
on the second row, from 8PM-6AM next day, two hours is included to my 3PM-2AM range criteria, which is 8PM-2AM (6 hours). Thats why I got 360 mins.
see this graph for reference:
I want to count the number of minutes falls during "OFF PEAK HOURS"-shaded in orange/tan.
Is it doable in expression?
Thank you in advance.
Please note that I am using fetchXML for the query.
Supposing the table you put in the question is wrong and it is only an example, I think you can get the spent minutes between two dates by using this expression:
=DateDiff(DateInterval.Minute,
Fields!From.Value,
Fields!To.Value
)
Example:
=DateDiff(DateInterval.Minute,
CDATE("2016-06-06 07:00:00 AM"),
CDATE("2016-06-06 05:00:00 PM")
)
The above example returns 600. 10 hours by 60 minutes. DateDiff function returns the specified date/time interval of time between two specified dates.
Let me know if this helps.

Cron Expression for dynamic schedule

I am looking for a Cron Expression that will schedule in different time in different weekdays. I'm not sure if that is possible or not.
I searched and found that Cron can schedule "At 8:00am every Monday through Friday" or "At 1:30am every last Friday of the month".
But is it possible to get cron expression that will schedule like, say :
10:00 AM every Monday
12:00 AM every Tuesday
02:00 PM every Wednesday
04:00 PM every Thursday
06:00 AM every Friday
I'm new to Cron Expression, and through google, I could not find whether it is possible.
My query is :
Is it possible to create cron expression like that?
If possible, then can you provide sample expression for that? along with some tutorial to know how to create them.
No, you need to write a different cron expression for each time-day(s) combination.
Ubuntu has a nice tutorial about cron. To run something at 10:00 AM every Monday:
# Min Hr Day Month Weekday Command
00 10 * * 1 touch /tmp/cron_has_run
Note that weekdays are counted from zero, so 0 is Sunday, 1 is Monday, etc.

Report scheduling in Jasper Server

How to setup a report schedule in Jasper server 5.0 to run every 2 hours, from 8:00 AM to 8:00 PM every day excepting Saturdays? In other words - the schedule has to start at 8:00 AM, runs every 2 hours and stops at 8:00 PM for every day, excepting Saturdays.
The hours input box should be filled as 8,10,12,14,16,18,20