Introduction
Procedure
To start, make a copy of the wp-toolkit.sqlite3 database to protect against data loss/corruption.
cp -v /usr/local/cpanel/3rdparty/wp-toolkit/var/wp-toolkit.sqlite3{,.clean.backup}
The updater is governed by a cron set in the ScheduledTasks SQLite database for wp-toolkit. The default configuration can be seen in the following example, note Id/row 2 contains the command for auto-updater.
sqlite3 /usr/local/cpanel/3rdparty/wp-toolkit/var/wp-toolkit.sqlite3 -header "SELECT * from ScheduledTasks;"
id|minute|hour|dayOfMonth|month|dayOfWeek|command|arguments
1|28|*|*|*|*|'/usr/bin/sw-engine' '-d' 'auto_prepend_file=/usr/local/cpanel/3rdparty/wp-toolkit/scripts/scheduled-task-prepend-file.php' '/usr/local/cpanel/3rdparty/wp-toolkit/plib/scripts/maintenance.php'|[]
2|40|4|*|*|*|'/usr/bin/sw-engine' '-d' 'auto_prepend_file=/usr/local/cpanel/3rdparty/wp-toolkit/scripts/scheduled-task-prepend-file.php' '/usr/local/cpanel/3rdparty/wp-toolkit/plib/scripts/instances-auto-update.php'|[]
In the above example, each row begins with an ID column, which is followed by a standard cron style configuration. You may reference the following cPanel documentation if you are unfamiliar with the standard cron configuration format:
sqlite> pragma table_info('ScheduledTasks');
cid name type notnull dflt_value pk
---------- ---------- ---------- ---------- ---------- ----------
0 id INTEGER 1 1
1 minute VARCHAR(25 0 0
2 hour VARCHAR(25 0 0
3 dayOfMonth VARCHAR(25 0 0
4 month VARCHAR(25 0 0
5 dayOfWeek VARCHAR(25 0 0
6 command VARCHAR(25 0 0
7 arguments VARCHAR(16 0 0
sqlite3 /usr/local/cpanel/3rdparty/wp-toolkit/var/wp-toolkit.sqlite3 "UPDATE ScheduledTasks SET hour='4/*' WHERE id=2;"
After modifying the auto-update
schedule with the above command, you may verify that it was updated properly by issuing the following command:
sqlite3 /usr/local/cpanel/3rdparty/wp-toolkit/var/wp-toolkit.sqlite3 -header "SELECT * FROM ScheduledTasks WHERE Id=2;"