Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Timer operation

Status
Not open for further replies.

audiopro

Programmer
Apr 1, 2004
3,165
GB
I am setting up an auto backup system from within an app. I propose the backup file is uploaded in the early hours, when nobody is using the machine. I plan to put a timer on the main menu form, which is the default when the app is dormant. The timer event will check the hour every 35 minutes and if hour = 4am. it will create the backup file and FTP it to the server.

I would normally use a scheduled task but this client is many miles away and notin the least bit tech savvy.

Are there any known issues with having a timer trigger throughout the day, while the program is in use?



Keith
 
Are there any known issues with having a timer trigger throughout the day, while the program is in use?

Absolutely none, but I would extend it to 1 hour...and I would not put the timer in the main menu form, but in an object which is instantiated at startup and "hovers" in the background... If this is a multiuser app, run vfp as a service on a server and start the timerobject there...
 
We have similar scenario, and as the data grew, the upload time took longer to zip and upload to the ftp.

In turn, it locked the application while it was uploading and it was harder to maintain.

so, what we did, we built a small app, that resides as a system tray, which had a timer and it did the upload itself.

it copied the files to a temp folder, zipped it, and uploaded the zip file to the ftp.

Ali Koumaiha
TeknoPCS Inc.
Dearborn heights, MI 48127
 
to elaborate more, the main application checked the presence of the BackupUtility in the system process, every 30 min or so, and if it was not running, it fired it up (shellexecute).

and upon starting of the main app, it checked for that too, and when exiting the main app too, it checked too.

so the utility was always on (unless we dropped a flag file on the c:\ to tell it to shut down) to update the BackupUtility.

Ali Koumaiha
TeknoPCS Inc.
Dearborn heights, MI 48127
 
Keith,

I don't think you'll have a problem with a timer that only fires every 35 minutes or so. I have a couple of apps in the field that let an administrator force users out of the system. The admin sets a flag, and the users' systems check for it on a timer. I fire the timer every five minutes. This has been working for a couple of years, with hundreds of users, and I'm not aware of any problems.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top