Announcement

Collapse
No announcement yet.

Write to file is delayed ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Write to file is delayed ?

    Hello all,

    I have a script that does what I want. It writes to a file depending on the values I have specified. However, there are times when I see the activity in the eSignal chart, but it doesn't write to the file immediately.

    It should be writing to the file on every tick. Unfortunately, there are times it is over a minute late writing all the back tick data.

    I know that it is not overwhelmed because many times it only needs to write a line or two.

    Assuming my script is correct, is there any other reason eSignal would delay writing to a file?

  • #2
    mlipham,

    I don't believe eSignal has anything to do with this issue based on what you described (no code).

    It sounds like you are keeping the file open (which is ok, but can result in data loss on sudden program termination). To ensure you promptly write data to a file, use the flush method.

    fileObj.writeln("your data");
    fileObj.flush();

    Comment

    Working...
    X