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?
158 Views Asked by סטנלי גרונן At
1
There are 1 best solutions below
Related Questions in QT
- C++ template using pointer and non pointer arguments in a QVector
- Using QPointer and QObject::connect with C++11
- qt How to style a QToolBar > QToolButton overflow button?
- Qt - Repeatedly write at beginning of file
- C++ Mongodb driver, not working
- deletion and cleanup of worker thread in Qt crashes
- How to drap item from QTableView to QPushButton?
- get image type from qimage
- C++ QT Getting part from QString
- How to connect a destroyed signal of C++ object from QML?
- How to get shader version from QOpenGLShader?
- Size of Qt QRadioButton able to get smaller, but not larger than default
- error WinSock.h has already been included Boost Windows Qt
- How to call a non-class member function with pointers as parameters with QtConcurrent::run?
- What is the difference between MinGW SEH and MinGW SJLJ?
Related Questions in TIMER
- NSTimer won't start (Swift)
- Using a timer to alter the alpha for object for a few seconds?
- timer in Jframe restart
- javaFX : How to periodically load information from db and show it on a Label?
- Calculating average and percentiles from a histogram map?
- Changing background of button every second
- Issues with long running Handlers, Timers, and Tasks?
- Android Studio: Where to place onClickListener in Master/Detail Flow, to start a CountDown Timer on Button Click
- Timer countdown formatting problems
- Countdown timer goes into negative number (00:00:00)
- Javascript timer - You generated the link "X seconds ago"
- How to resume a timer?
- Android- executing commands while countdown timer is running
- Backgroundworker to stop work after specified time
- Using AS3 Timer & distriqt Notification ANE To Send Notifications While In Sleep Mode
Related Questions in TASK
- background thread using Task.Run
- How to ensure data synchronization across threads within a "safe" area (e.g not in a critical section) without locking everything
- Task await fails
- How to handle multiple activity task in android when press home?
- Run work on specific thread
- c# Simple TASK Cancel
- Add checkbox in task Page In inno-setup and make it work according to checkbox
- How to fetch tasks from android calendar?
- Javafx concurrency and gui-update
- Celery Logging: consistent way to log inside and outside of a task
- Android Studio ——How can I modify one Class's field before compile by build.gradle
- the mappers execute sequentially not parallelly
- Java RMI Compute Engine
- Task finishes before expected
- What are the ContinueWith default values
Related Questions in JOBS
- how to identify user who created a specific job on jenkins?
- Sort order for job steps in SQL Server 2008 R2
- Laravel 5.2 Job with delay fires instantly instead of waiting
- Qt5: How to do a cleanup manager (1 or more tasks) that run periodically to do cleaning-job?
- Scheduled job to copy data
- Why hadoop slave cannot run a job?
- Threadpool how to make a thread pool with queue in C?
- What is the role of the last argument ( $uniqueId ) in PHP Gearman's doNormal()?
- Defining node agenda jobs for these use cases
- Job not executing at fixed rate
- Jenkins jobs running on slaves
- Jenkins jobs configuration checking before run it
- Best way to check multiple tasks done in Celery?
- Chaining steps in spring batch
- Jenkins Permission's to user according to jobs
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)
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?
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.