none
How to implement a professional Scheduler for my program. RRS feed

  • Question

  • Hi I'm stuck with my application.

    My application (see attached picture) uses httpWebRequest to send data from its body to our partner companies.

    Now I need to add a scheduler as per my superiors requests.

    The logic of the program is as follow : 

    **********************************************

    - When you click on "Create" button, it displays a new window to fill up information.

    - after filling everything, you click on "Save" and it creates a xml file of this data, and stores the file as .xml; then add the file name on the ListBox as (data file 1, data file 2, 3,...) as you see on the picture.

    - To edit the stored file, you just need to select it from the listbox and click "Edit" button

    - To Delete the file, you just need to select it from the listbox and click "Delete" button

    - To Send the file over through to our partner companies over HttpWebRequest, you just need to select it from the Listbox and click "Send" button.

     

    Note : (It doesn't send the file like an email by attaching the file, but it sends the file by opening the xml file inside VB.Net, collecting the data and putting the data on the HttpWebRequest body as the HttpWebRequest body has variables for the data)

    I now need to add a scheduler as per my boss requirement.

    Because each data file will have its own schedule to be send out.

    Someone told me to create another application separately which will be linked using MSMQ...  another guy told me to use an external scheduler like "Quartz"...    

    My question is : I want to know, which scheduler should I use to perform the above as a professional developer??  Will Windows Task Scheduler work in this situation?  and how to implement it?  if no, what should I use??

    Please don't hesitate to give me advanced .Net concept !!!

    Thanks in advance !!!

    Below are my links for the pictures

    https://www.dropbox.com/s/2qsu4b9ftf0luvn/WT_Model1.png?dl=0

    https://www.dropbox.com/s/dkb2v0kh9cjqypd/WT_Model2.png?dl=0

    https://www.dropbox.com/s/2sb0yyitfag5ejn/WT_Model3.png?dl=0


    • Edited by Christine25 Thursday, April 19, 2018 4:52 PM
    Thursday, April 19, 2018 4:51 PM

Answers

  • It seems to me that you would be bypassing the ListBox and associated Buttons if there is a schedule contained in the XML files of when they should be sent.

    Therefore I would recommend using a DataGridView to display the scheduled date and time for delivery in the first cell and the files path in the second cell.

    Use a FileSystemWatcher to determine if any new files appear wherever the XML files are stored. Do you delete the XML files once they are sent?

    When the app loads read all the XML files for their scheduled date/times and get their filepaths and load the DataGridView with those.

    Then you could use a simple timer for determining on the current date at whatever time the appropriate file is to be sent according to the first cells fields in the DataGridView.

    I don't really understand what you mean by a professional scheduler. What's the necessity if there is simplicity available.

    Also once a file is sent and before it is deleted or moved you could highlight its row in yellow or something to let somebody know it is being sent and then delete the row once it is sent and delete/move the file.

    Unless there is more to the issue please let us know.

    If you could use a code block to display an example XML file and where the schedule to send is in it then some of the code could be provided including a FileSystemWatchers code. That way we could drag the xml file to a folder, watch its info get put into the DataGridView then deleted it on send time. And make copies of the original for making multiple files with different schedule times.


    La vida loca


    • Edited by Mr. Monkeyboy Thursday, April 19, 2018 7:35 PM
    • Marked as answer by Christine25 Thursday, August 15, 2019 10:27 AM
    Thursday, April 19, 2018 7:32 PM

All replies

  • Hello,

    Please revise your post i regards to images, setup a Microsoft OneDrive account (totally free), upload images there and provide links. When logging into OneDrive use the same user name and password as logging into these forums.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Thursday, April 19, 2018 5:47 PM
    Moderator
  • Okay, I looked a Quartz.NET and it looks decent yet missing a support page meaning if you need assistance of any kind there are no dedicated forums. That to me is a "no go" as I would want if nothing else public support.

    Now looking at code (this is C#/ASP.NET but easy to follow) it appears easy enough yet without support well.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Thursday, April 19, 2018 5:57 PM
    Moderator
  • It seems to me that you would be bypassing the ListBox and associated Buttons if there is a schedule contained in the XML files of when they should be sent.

    Therefore I would recommend using a DataGridView to display the scheduled date and time for delivery in the first cell and the files path in the second cell.

    Use a FileSystemWatcher to determine if any new files appear wherever the XML files are stored. Do you delete the XML files once they are sent?

    When the app loads read all the XML files for their scheduled date/times and get their filepaths and load the DataGridView with those.

    Then you could use a simple timer for determining on the current date at whatever time the appropriate file is to be sent according to the first cells fields in the DataGridView.

    I don't really understand what you mean by a professional scheduler. What's the necessity if there is simplicity available.

    Also once a file is sent and before it is deleted or moved you could highlight its row in yellow or something to let somebody know it is being sent and then delete the row once it is sent and delete/move the file.

    Unless there is more to the issue please let us know.

    If you could use a code block to display an example XML file and where the schedule to send is in it then some of the code could be provided including a FileSystemWatchers code. That way we could drag the xml file to a folder, watch its info get put into the DataGridView then deleted it on send time. And make copies of the original for making multiple files with different schedule times.


    La vida loca


    • Edited by Mr. Monkeyboy Thursday, April 19, 2018 7:35 PM
    • Marked as answer by Christine25 Thursday, August 15, 2019 10:27 AM
    Thursday, April 19, 2018 7:32 PM