NetTalk Central

Author Topic: Scheduled daily task  (Read 3759 times)

lkeyser

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • Email
Scheduled daily task
« on: June 09, 2016, 04:27:36 AM »
Hi everyone
I need some assistance or guidance.
My problem
I have a list of products that need to be flagged, sell by date expired.
I need to run a scheduled task on a daily basis to flag these products.
Where do I add this in the code, or do I need to create an external application and use a timer event on a windows to get this right.
If anyone van help me.
Regards
Louis

carlitm

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Scheduled daily task
« Reply #1 on: June 09, 2016, 07:31:26 AM »
Hi

I do this by setting a timer on the WebServer procedure - 360000 = 1 hour

In TakeWindowEvent(), After Parent call I use this code for a BackUp procedure

        DateLastBackup = s_web.GetHostValue('DateLastBackup')
        IF TODAY() > DateLastBackup THEN
            START(BackUpCopy,50000)
            s_web.SetHostValue('DateLastBackup',TODAY())
        END

HTH
Carl

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Scheduled daily task
« Reply #2 on: June 13, 2016, 05:13:46 AM »
you can do it in a separate program, or on a separate thread from the webServer procedure, as Carl suggests.

cheers
Bruce

lkeyser

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • Email
Re: Scheduled daily task
« Reply #3 on: June 13, 2016, 10:50:45 PM »
Thanks.

Thanks Carl, Bruce.

Working 100 %

Louis