Is there a way of setting a tasks priority. I have a program that processes a lot of data from text files created by another device. The user now wishes some stats from this program, I wish to create them on the fly. The problem is each text file takes approx 30 - 40 minutes to process and creates thousands of records in my databases. When I put in the stats accumulation I slowed the program by 50%, so I thought I will just write the stats to a single dbf file containing stat type, equip id, date, value and in the program that processes the data I would start (WINEXEC) another program to actually process the stats into the Weekly, Monthly and Yearly stats dbfs which have approx 22 different stat fields.
The problem is there is little difference in processing time by the main program as the program I started from it hogs the CPU each time it checks the DBF for new records, I have a timer set at 10000 to do the check DBF written by the main program and append any data if necessary and delete each record created by the main program to avoid processing the record more than once, I also do a sysrefresh every 10 records to try and share the CPU.
If I could winexec the stats program and have it perform at a lower priority then maybe the main program will function better. Or do I need something to run each in their own memory space (XP) which may also overcome the problem.
Any assistance would be appreciated.
Gerry