locked
Scheduling an action every 10 seconds RRS feed

  • Question

  • User482 posted

    Our incident-reporting app will be used off line a lot, so in the design messages are sent to a local Sqlite database, then a task needs to check the database for messages to post when a network is detected.

    I am looking for a robust tool that will let me run this task every 10 seconds.

    I found Coravel (https://github.com/jamesmh/coravel) but it doesn't seem to have a Xamarin Forms working version.

    Any suggestions on a framework?

    Monday, June 25, 2018 6:37 PM

Answers

  • User180523 posted

    A tool... ? Can't you just run your code on a Task.run | Task.delay? Its just a db check and upload, right? https://msdn.microsoft.com/en-us/library/hh194845(v=vs.110).aspx

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Monday, June 25, 2018 7:00 PM

All replies

  • User180523 posted

    A tool... ? Can't you just run your code on a Task.run | Task.delay? Its just a db check and upload, right? https://msdn.microsoft.com/en-us/library/hh194845(v=vs.110).aspx

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Monday, June 25, 2018 7:00 PM
  • User89714 posted

    @IanVink - Why not just check for records that need uploading when network connectivity becomes available AND upload any newly created records if network connectivity already exists, rather than polling every 10 seconds?

    James Montemango's Connectivity plugin gives you the network state and state changes that you need. See https://jamesmontemagno.github.io/ConnectivityPlugin/

    Monday, June 25, 2018 11:10 PM