Source language: Translate to:

Where tmAlarms&Events stores it's scheduled events

Questions about NeoBook PlugIns

Moderator: Neosoft Support

Where tmAlarms&Events stores it's scheduled events

Postby BRobinsonS » Sun Sep 16, 2007 7:58 am

I was wondering where tmAlarms&Events stores the scheduled events.

Right now I am writing the events to a text file, but was wondering if there was already a data file being created.

Right now I am using something along the lines of:

FileWrite "[PubDir]time.txt" "Append" "[Date1], [Time1], [Description1]"

but i am thinking of maybe writing the data to a data base instead of a txt file to allow it easier to browse one time, daily or weekly scheduled events. Anyone have any ideas of a good way to do this or any suggestions on the advantages of using a data file or text file is better?

Also when creating a time scheduler application and storing the events in a file, if the application is shut down and restarted later would I need to have the program upon startup search for any scheduled events for the day from the text or database file and re-schedule them using the proper tmAlarmEventsCreate command?

Thanks
Tom
User avatar
BRobinsonS
 
Posts: 337
Joined: Sun Sep 25, 2005 9:00 pm
Location: Ontario, Canada

Postby TechMedia » Sun Sep 16, 2007 8:38 am

This is up to you. You can store in a database, in a txt file. whatever you want. You can store a TXT file inside a stream (tmStorage) or use tmStorage built in variable transfer to do that.


Best regards
TechMedia
 

tmAlarms&Events and Database

Postby BRobinsonS » Mon Sep 24, 2007 6:59 am

I have set up my program to use a database to write tmAlarms&Events events. I am now at a point where I could use some input and ideas to get the tmAlarms&Events to load the events and schedule them.

Because there is a chance the program will get shutdown when the computer is shutdown at night, I need to set up a few things in the program.

When Program Starts:

1. Load only events that are scheduled for that day from a database and schedule the alarms for them.

a. I understand how to query the data file and get the results, but from there is it a matter of doing a count of how many items and writing a loop to load each one, one a a time using the tmAlarmEventsCreate command?


b. also as some would be unique, some daily some hourly, etc I would think that would have to be considered when loading the events as to which command might be used.


2. When new events are added, deleted, changed

a. tmAlarmEventsCreateClearEvents, then reload the scheduled events for the day each time something changes or is there a better way to manage what is scheduled and what is not?

I may be over complicating things with how I am setting everything up. It has been a long time since I have really worked with neobook and I am finding I have to keep going back to rework my code to streamline it. So any help or ideas, suggestions is much appreciated.

Thanks
Tom
User avatar
BRobinsonS
 
Posts: 337
Joined: Sun Sep 25, 2005 9:00 pm
Location: Ontario, Canada

Postby TechMedia » Mon Sep 24, 2007 10:54 am

I think a standart TXT file would be easier to use. You can put each events on a single line and parse that line to add an event.
TechMedia
 

Postby BRobinsonS » Wed Sep 26, 2007 8:11 pm

After trying both methods txt vs database, I have went with using a database format to save info. Seems easier in the long run to pull,sort, and view the events I am storing. Of course I am not much of a programmer so I am probably working as* backwards.

Thanks for the input,
Tom
User avatar
BRobinsonS
 
Posts: 337
Joined: Sun Sep 25, 2005 9:00 pm
Location: Ontario, Canada


Return to PlugIn Discussions

Who is online

Users browsing this forum: No registered users and 1 guest