Introduction
WP Toolkit's auto-update schedule is stored in an SQLite database and governed by a cron set. This article explains how to modify the cron set to change the WP Toolkit auto-update schedule.
Procedure
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Backup the
wp-toolkit.sqlite3
database.cp -va /usr/local/cpanel/3rdparty/wp-toolkit/var/wp-toolkit.sqlite3{,.$(date +%s)}
- Locate the locate the auto-update database entry.
[root@server ~]cPs# sqlite3 /usr/local/cpanel/3rdparty/wp-toolkit/var/wp-toolkit.sqlite3 -header "SELECT * from ScheduledTasks where command like'%auto-update%';" id|minute|hour|dayOfMonth|month|dayOfWeek|command|arguments 2|28|5|*|*|*|'/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'|[] [root@server ~]cPs#
- Use the
UPDATE
SQL command to update the cron set as desired.sqlite3 /usr/local/cpanel/3rdparty/wp-toolkit/var/wp-toolkit.sqlite3 "UPDATE ScheduledTasks SET hour='*/4' WHERE id=$ID;"
-
Please note that "$ID" must be replaced with the
id
value found in the previous command.
Please note that, in the above example, the auto-update was set to run every four hours. - Verify that the cron set was updated properly.
sqlite3 /usr/local/cpanel/3rdparty/wp-toolkit/var/wp-toolkit.sqlite3 "SELECT * FROM ScheduledTasks WHERE Id=$ID;"
Please note that "$ID" must be replaced with theid
value found above.
Comments
0 comments
Article is closed for comments.