Advanced data transfer schedule

We have a Flexy 201 out there on firmware version 12.1s2 and I’ve linked it up to connect to our eSync instance, etc.

In the System Setup | General | Data Management option there is a section labeled Advanced data transfert schedule which appears to be for custom schedules an such.

The field above labeled Upload interval has a little note to leave it set to a value of 0 [zero] if you want to use the Advanced data transfert schedule options. (screen shot below)

Questions

  • What manual or guide or post should I read to see additional detail about this functionality?

  • Would support be able to provide me some simple example logic which I’d plug into the Advanced data transfert schedule field value to tell it to send a sync every 30 seconds?

  • Are there any gotchas or special consideration when deciding how to use this feature?

Hi @PJ_IOT

The advanced transfert schedule simply allows you to use CRON syntaxing when setting up your transfer schedule. You wouldn’t be able to do every 30 seconds here as cron doesn’t go less than 1 minute.

An example of every Tuesday 1 PM would be: 0 13 * * *

A good builder that I use for making tasks is: https://crontab.guru

Ah, okay. . . I suppose this is not documented in any eWON guides and such then correct?

Also, is it possible to trigger an eSync from BASIC IDE level scripts and leave the interval at 0 so then I could use a timer to run every 30 seconds. Some people say having two cron job that run once a minute but put a 30 second pause on one such as * * * * * ( sleep 30 ; /path/to/executable) would cause the second one to wait 30 seconds and then run the command or whatever. It seems this field alone may not be robust enough to handle such a solution.

If you can think of any workarounds or other methods I could test with, I’m glad to give it a try but I was hoping there was a specific guide or something that talks about that functionality in particular in more detail but I don’t think there is. I’ve checked HMS.how, read many eSync guides, and the programming guide was searched too plus regular Google search too. Perhaps there’s some term or keyword I’m not using right.

Hi @PJ_IOT

You can find information on this in the PDF below, the transfer scheduled and the scheduled planner are one in the same thing.

As for a workaround, below is a nice little delay function that you could essentially use as a 30 second timer. It works by taking a time stamp in milliseconds and then delaying the program execution by counting the number of seconds.


FUNCTION delay%($mSec%)
  $start% = GETSYS PRG, "MSEC"
  $loop:
    FOR $i%=1 TO 1000
      Next $i%
   $now% = GETSYS PRG, "MSEC"
   $delay% = $now% - $start%
   IF($delay% < $mSec%) THEN GOTO $loop
ENDFN

You could integrate this by calling your DMSync inside of the else loop and just making it recursive.

So edit the function to be:

FUNCTION delay%($mSec%)
  $start% = GETSYS PRG, "MSEC"
  $loop:
    FOR $i%=1 TO 1000
      Next $i%
   $now% = GETSYS PRG, "MSEC"
   $delay% = $now% - $start%
   IF($delay% < $mSec%) THEN 
       GOTO $loop
   ELSE
       DMSync REM Issue your sync request here
       @delay%(30000) REM call delay again with another 30 second interval
   ENDIF
ENDFN

Gotcha… I was after the DMSync command in particular too. Thank you @jseanor

1 Like