I am using Qt5 under Windows7.
I need to implement some kind of cleanup manager for my application.
It will be "activated" let's say once per hour, in order to perform some cleanup job(s): trim history if it's > 1000 lines, delete records form a database if older than 30 days and other things like this...
How should I do it in order to be flexible (to allow future cleaning tasks to be added later) and also to have minimal/reasonable impact on the application performance, i.e.: application is kinda multitasking server doing TCP connections and database connections, etc and I don't want the cleanup manager/task(s) to have some negative impact on the overall application speed/performance.
But ok, let's say a short time drop in performance would be acceptable as long as the user/client won't complain about such aspects :)
I am novice in Qt programming... I was thinking about using QTimer that periodically triggers a QTask/Qthread or something...?
Regards, Stanley.
Qt5: How to do a cleanup manager (1 or more tasks) that run periodically to do cleaning-job?
159 views Asked by סטנלי גרונן At
1
There are 1 answers
Related Questions in QT
- qt c++ fonction converting adress to coordinates (longitude, latitude)
- Qml table and chart using python
- Qt: running callback in the main thread from the worker thread
- i have installed qt version 6.0.3 and this error QMYSQL driver not loaded displaying again and again
- Frameless Qt + WinAPI maximized window size is bigger than the availableGeometry()
- new window with c++ qt
- How to get scaling from transformation matrix
- How to build just Qt core libraries from Qt sources
- doxyqml not documenting qml files properly
- Incorrect assignment from a QStringList to a char * array
- How to make QT Chart size larger than widget size?
- Queued async operations with QtConcurrent interfere QImage from freed
- Questions about qt5 dynamic link library
- how to document QML files inside C++ project?
- How do I keep my screen contents centered and also have a scrollbar in QT?
Related Questions in TIMER
- DateTimePicker not working, textField not updating with selected hours and minutes
- Timer stops the program before it is over
- I cannot get this to redirect. The timer works but it doesn't go anywhere. I need this to redirect to another webpage
- Enabling one timer using another
- iOS Swift Timer sometimes fires much later than expected
- Canceling stop the animation made with requestAnimationFrame()
- How to dynamically change fields in blocs flutter
- How to show countdown for all angular pages without resetting
- Problems with function called by System.Threading.Timer
- Angular 17 does not update view using setInterval with NG0500 error in console
- How to time how long a bash alias took to execute (solved... maybe?)
- I'm using JSF and after a timer expires, I want to display a warning
- Under the swiftUI framework, the timer cannot continue to count in the background
- requestAnimationFrame not working when callback not utilised directly
- Crash on Timer Callback in Swift: closure #1 in ViewController.updateTimer() Causes App to Crash
Related Questions in TASK
- Musical chairs: How can an asynchronous task cancel a synchronous one in c#?
- schedule a task that runs as administrator privileges
- How do you update Celery Task State/Status to see it in Flower?
- Why use tasks and async await in C# inline?
- I used "lock" in the "task it doesn't work and race condition occurred
- Is it feasible to use either Task.Run or BackgroundWorker to process multiple account registrations simultaneously
- Rust Analyser Update VS Code
- How can I capture a celery.signal for when a task is "queued", must include a way to access kwargs?
- Adding in Tasks time spend on them with option to add endlessly until is Task done
- Feature Request: Enumeration of issues with Workspace Trust "Do you trust the authors of the file in this folder?"
- Create a task in mybb to automatically recount and rebuild forums and threads every 1 minute
- Can 2 different task queues use the same taskoption url param value?
- Trying to find a way to limit the number of List<Task> that can run at one time
- Main thread errors during executing a thread unsafe program from a responsive Windows Forms app
- How to register celery class based task with a custom name in 5.x?
Related Questions in JOBS
- is there a solution to run cron job command in cpanel only from my cPanel host?
- Getting "onNetworkChanged()" warning every few seconds in an Android application
- All of a sudden not working, using linked server to source getting "Communication link failure"
- PowerShell Toggle Button for Background Job Report Generation
- Retirgger aws glue job dynamically
- How generate multiple PDF's in Laravel?
- How to chain jobs in Dagster?
- Slurm - How to run a list of jobs n by n?
- How to bring a job to foreground and then disable job control in bash?
- Check duplicate jobs having same parameters in Laravel
- Can I know the background running process using "jobs" even i close the terminal in Linux?
- persisting a task + execute later and remove that task from queue using hangfire or quarts or builtin
- How to prevent Kubernetes scheduler from delaying job pods in pending state due to resource constraints
- Can excessive printing cause a job step to fail?
- Issue with Flink Job Failure when Using Custom Class as DataStreamSource Type
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
You are on right track you can use QTimer to trigger a cleanup slot in you cleanup manager. you can keep adding different slots for different cleanup activity. Looking at you query it seems it better to have all you cleanup task in threads so that cleanup will be done async and will have less impact on performance.