IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
Expand all | Collapse all

How to create a scheduled task

  • 1.  How to create a scheduled task

    Posted Wed November 13, 2002 09:07 AM

    Hello,

    i do have a scenario where file will be created in a folder.
    I want a scheduler to run periodically to monitor that that folder, if any file gets placed in the folder, then it has to pick up that file and copy it to another location.

    Could somebody explain me how to proceed …

    thanks in advance


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: How to create a scheduled task

    Posted Wed November 13, 2002 02:20 PM

    Are you talking about how to build the file processing logic (reading from one directory and moving to other) or only the scheduler part ?

    If you are asking only the scheduler part, then Create a flow service in Developer for file processing. Go to the Administrator web page> Scheduler > Create a schedule task> and provide your flow information and schedule details.
    Hope this helps!


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 3.  RE: How to create a scheduled task

    Posted Wed November 13, 2002 03:58 PM

    Thanks a lot. IT worked perfectly fine.
    Moreover we came to know from here that, the RUNASUSER parameter has to be sufficed with a valid user name to accomplish this task.

    Anyway, thanks Ashish…

    Badri


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 4.  RE: How to create a scheduled task

    Posted Wed May 28, 2003 01:55 AM

    Hello,

    I have a similar requirement. Everyday at 9:45 AM a file will be placed in a folder. I need to run a schedule service to run at 10:00AM and process the file. If i could not find the file at 10:00AM then it need to check on every 15 Mins interval till 11:30AM. If the file is not placed till 11:30 then i need to sent email notification.

    If the file is loaded in between that time then the scheduler should stop. For example file is placed at around 10:40 and my sheduler had picked the file at 10:45 then the job of the scheduler is over and it should not run again for the day and start next day.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: How to create a scheduled task

    Posted Wed May 28, 2003 02:08 AM

    Refering to my previous post…

    I’m working on webMethods 6.0.1 version.

    Thanks

    Uday


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 6.  RE: How to create a scheduled task

    Posted Wed May 28, 2003 02:10 AM

    If possible, you might consider using the new file polling featues in webMethods 6. If you’re interested in this new capability, let me know–I can send you more details since I can not upload more than a 20K attachment.

    Best regards,

    • Shawn W. Szturma
      Systems Engineering

    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 7.  RE: How to create a scheduled task

    Posted Wed May 28, 2003 02:19 AM

    The file polling port will work great for this, but if you want to use a scheduler, then look at the services in pub.scheduler.

    You will need two schedulers, the first is a one-time instance as per your description, the second will handle the 15 minute interval for file polling and is suspended. If you do not find the file, then turn on the second by resumeTask. Once the file is found, put it back asleep using the suspendTask.

    I’m willing to bet that you can do the same with the file polling port if you research it. The file polling port should be able to be enabled via a scheduler and disabled once the file is found until the next time the scheduler is run.

    Ray


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 8.  RE: How to create a scheduled task

    Posted Wed May 28, 2003 02:42 AM

    Thanks for your response.

    Yeah i can use the file pooling feature of WM6. Please let me know the more details on that.

    Thanks

    Uday


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 9.  RE: How to create a scheduled task

    Posted Wed May 28, 2003 12:32 PM

    Hi, Shawn (and others).

    I just upped the upload maximum allowable size to 35k from 20k. I hope this helps you to help other wMUsers members more effectively.

    There will be an official announcement in this week’s Go with the Flow but it sounds like you guys could use the tip now. :wink:

    Thanks.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 10.  RE: How to create a scheduled task

    Posted Fri May 30, 2003 03:18 PM

    Hi Ray,

    Can you be a bit more specific. I have a similiar requirement as Uday’s but I do not have webMethod version 6.0. So I am thinking of using the alternative suggested by you.

    What are the two schedulers u suggested we should be using pub.scheduler:addComplexTask and
    pub.scheduler:addRepeatingTask.

    Thanks a mill


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 11.  RE: How to create a scheduled task

    Posted Wed February 11, 2004 05:00 PM

    Well, what you could do, if I understand you correctly, is to add some code to your getDocs service such that if it does not find a file, then send email. If I understand you, this service gets run every 15 minutes. If it does not find a file in the directory, then you want notified. So, if empty then send email. Perhaps this is not really how you want it to operate.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 12.  RE: How to create a scheduled task

    Posted Thu February 12, 2004 01:48 AM

    Hi Edward
    Thanks for your reply.
    But there is some mis-communication between us. My getDocs will run after every one minute. I want another check, which will check for non-availability of files for 15 minutes. In case there is no file posted for 15 minutes or getDocs is not able to invoke for 15 minutes I want to send an alert.

    Rgds
    Prafulla


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 13.  RE: How to create a scheduled task

    Posted Thu February 12, 2004 02:54 PM

    Hello Praffulla,
    I agree with Bhavani. Just use a counter to determine if below 15 counts. If email is sent set a flag that it has been sent then if count is less then or equal to 15 AND flag indicates email HAS been sent then start over in the count ELSE send email.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 14.  RE: How to create a scheduled task

    Posted Fri February 13, 2004 09:39 AM

    The Storage Services are well documented in the BuiltInServices. Propose you to go through the same.

    Bhavani


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 15.  RE: How to create a scheduled task

    Posted Tue April 13, 2004 04:41 AM

    Just a suggestion on this old topic, maybe a service that

    set timer = 0
    LOOP
    timer++
    if directoy has file
    invokeTreaded something
    make another schedule of this service to run once
    if timer over 15
    email
    make another schedule of this service to run once
    sleep 60 second

    This algo is better than two schedule job. Imagine ur processDoc schedule processed over 60 second that means you will receiver email prematurely as 15 minutes might not have enough time to execute 15 processDoc


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods