locked
Starting receive location at particular time RRS feed

  • Question

  • Hi, 

    i have a requirement,  like campaign for some days, after completing Campaign i need to pick data and send to destination.so campaign will probably end always at day end  11:59 pm. i don't want to wait till 11:59 pm.

    need to pick the data exactly 11:59 pm and after receiving receive  location need to stop(means only for one time ).

    how can  i achieve this.

    Thursday, October 6, 2016 12:25 PM

All replies

  • Hi Dinesh,

    You need to set the service window on the recive location. This will make the receive location to recieve the messages in that particular time window.You can also make the receieve location pick up message during certain dates aslo.

    Refer below screen shot for sample

    Refer How to Configure Scheduling for a Receive Location

    for a quick walkthrough.

    As per MSDN: You can specify the dates when you want the receive location to start and stop processing messages. You can also specify certain times of the day during which you want the receive location to process messages.

    Regards


    Mandar Dharmadhikari

    Thursday, October 6, 2016 12:34 PM
    Moderator
  • Yes mandar,

    its working fine. but the pooling interval must be grater than the time between start time and end time .

    other wise  receive location will execute multiple times.

    and now how in case of file receive location.there is no option for to set pooling interval? 

    Thursday, October 6, 2016 1:00 PM
  • Why do you require the poling interval??

    Isnt continious pollinng satisfying your scenario??

    The recive location will pick up the messages between the service window only.

    In case you want to set the polling interval on the File location,

    Refer below link for the Polling for File adpter...

    https://social.msdn.microsoft.com/Forums/en-US/a9f7286b-a50c-4dc0-afc7-d48796e7fcda/file-adapter-polling-interval?forum=biztalkr2adapters

    In normal scenario the polling interval is 0 meaning the File adpter continously polls the data.

    from what I understand from your scenario you just need to pick files once at 11:59?? If that is the case the set the service window start at 11:59 and close the service window say a minute later.

    Regards


    Mandar Dharmadhikari



    Thursday, October 6, 2016 1:05 PM
    Moderator
  • Hi,

    How can i achieve to start and stop at the same day.

    I have tried like below but not working.

    because my requirement is as shown in the below screen(just one time execution):

    

    I am also tried by uncheck the stop date but it will continuously pooling without bothering about stop time



    • Edited by DineshNad Thursday, October 6, 2016 1:31 PM
    Thursday, October 6, 2016 1:27 PM
  • So we can provide the best advice, please answer some very important questions:

    1. Where is the data coming from?  What Adapter?

    2. You expect only 1 incoming message?

    3. If it's SQL Server, is there the possibility of using a date value on the data itself?

    Thursday, October 6, 2016 3:00 PM
    Moderator
  • Create a windows Taskplaner job starting a batch file with this script https://msdn.microsoft.com/en-us/library/aa561437.aspx to enable your receive location daily at 23:59.

    Create a second job running 00:01 daily (or a little bit later if your job runs for some minutes) with a second batch using the script command to stop it again.

    Think it was simply changing anything enable to disable in the script. Can't check at the moment but i'm quite sure it was disable.

    Works fine using it on one machine for years now to get the result you are asking for.



    • Edited by Snoopy2016 Thursday, October 6, 2016 7:12 PM
    Thursday, October 6, 2016 7:08 PM
  • Hi Dinesh,

    Please try with these settings

    Start time : 11:59:00 PM

    End time : 00:02:00 AM

    Polling Interval : 5 minutes


    JB

    Thursday, October 6, 2016 8:23 PM
  • hi janardan,

    it will work fine  as you said.

    but it is also have some drawback means ,

    we have given gap between start and stop as 3 minutes and pooling interval is 5 minutes so it will pick only one time.

    in case by mistake hosts are stopped and  started by any issue in between 3 minutes, data will be picked again.

    i am not saying its a solution  but, it is better to handle at procedure end as Johns said.

    Friday, October 7, 2016 4:43 AM
  • Hi Dinesh,

    can you share the answers to the questions asked by Johns305??

    Regards,


    Mandar Dharmadhikari

    Friday, October 7, 2016 4:46 AM
    Moderator
  • hi Mandar,

    1. Where is the data coming from?  What Adapter?

    A)SQL 

    2. You expect only 1 incoming message?

    A)YES

    3. If it's SQL Server, is there the possibility of using a date value on the data itself?

    A)YES

    Friday, October 7, 2016 5:22 AM
  • Hi DineshNad,

    It is better that you go with using date Value on the data itself. WCF SQL adapter does provide the polling interval capability...

    So create a stored proc which polls the data based on the date value and ispolled flag=0(Create this column for the table and keep it 0 for data that is not polled..change to 1 once polled) and then updates ispolled for all the data rows that are polled to 1.

    So this will make sure that even if the recieve location tries to poll the data, it will not fetch any data as you have already updated the flag for all the rows in your previous poll.

    regards,


    Mandar Dharmadhikari

    Friday, October 7, 2016 5:41 AM
    Moderator
  • Hi Dinesh,

    in case by mistake hosts are stopped and  started by any issue in between 3 minutes, data will be picked again. - How come the data will be picked up again? When you first gets the data from SQL definitely you will update the status to some Processed etc..so even if it is called again due to host restart within those 3 minutes it won't pick right...

    Thanks

    JB


    JB

    Sunday, October 9, 2016 8:00 PM