- Details
- Written by Tech Notes
- Published: 14 December 2014
How To Restore/Recreate/Reinstall/Undo Deleted Concrete5 Automated Job
If you have accidentally deleted (Removed) an Automated Job from within your Concrete5 (C5) website control panel, then hopefully you will find this article useful.
Please note that I do not get paid to do these articles.
I based on this article on Concrete5 version 5.5.1 and higher, and did not check how many versions lower and higher it applies to.
Hopefully, you have an old Full Backup or database (DB) backup. If not, I am posting here what the DB would have.
If you have an old database (.sql file) backup, or you can extract it from a Full Backup, then open your Concrete5 website .sql file with something like Wordpad on a Windows computer or any other text editor that will space and column format the content of the file for you. Search the .sql file for the phrase, "Remove Old Page Versions", and will take you directly to the Jobs table. You are going to care about something that looks like this:
(4,'Remove Old Page Versions','Removes all except the 10 most recent page versions for each page.','2012-01-24 17:51:45','2013-08-06 11:23:10',0,'All pages have been processes, starting from beginning on next run.',0,'ENABLED','remove_old_page_versions',0)
That section is specifically for the automated job to "Remove Old Page Versions", except the most recent 10. You would be very interested in that if you happen to have deleted that specific Job from your C5 site.
The other entries (Automated Jobs) would be listed in the .sql file right above where you found the above mentioned portion. Here are the typical ones:
(1,'Index Search Engine','Index the site to allow searching to work quickly and accurately.','2012-01-24 17:51:45','2013-08-06 11:23:22',0,'Index updated. 5 pages required reindexing.',0,'ENABLED','index_search',1),(2,'Generate Sitemap File','Generate the sitemap.xml file that search engines use to crawl your site.','2012-01-24 17:51:45','2013-08-06 11:23:27',0,'Sitemap XML File Saved.',0,'ENABLED','generate_sitemap',0),(3,'Process Email Posts','Polls an email account and grabs private messages/postings that are sent there..','2012-01-24 17:51:45','2013-08-06 11:22:51',0,'The Job was run successfully.',0,'ENABLED','process_email',0),(4,'Remove Old Page Versions','Removes all except the 10 most recent page versions for each page.','2012-01-24 17:51:45','2013-08-06 11:23:10',0,'All pages have been processes, starting from beginning on next run.',0,'ENABLED','remove_old_page_versions',0);
So, even if you do not have a copy of your .sql file, the above should provide what you need to restore any of the 4 typical auto jobs that come with the default install of Concrete5.
Steps To Restore Automated Job
- You will now need to make use of your database management tool, whatever that may be, and add the missing entry into the database table. For this article, I will only reference usage of phpMyAdmin, especially since that is what Web Hosting With $1 (WHW1.com) provides with their cpanel hosting control panel and I find it to be very easy and useful I suspect most people make use of it for their mySQL database management.
From your hosting control panel open the phpMyAdmin or use remote mySQL connection interface. - Once in phpMyAdmin, select the database for your Concrete5 site.
- Then select the Jobs table of the DB.
- Lets say you want to restore the "Remove Old Page Versions" automated job that got removed.
- Method 1. You can mouse button (left button) click on the Insert button, and enter the above mentioned SQL data, mentioned here again.
(4,'Remove Old Page Versions','Removes all except the 10 most recent page versions for each page.','2012-01-24 17:51:45','2013-08-06 11:23:10',0,'All pages have been processes, starting from beginning on next run.',0,'ENABLED','remove_old_page_versions',0)
- Method 2 (recommended). You can mouse button (left button) click on the SQL button,
and insert the above mentioned SQL data with the following entry into the "Run SQL query/queries" field:INSERT INTO `Jobs` VALUES(4,'Remove Old Page Versions','Removes all except the 10 most recent page versions for each page.',now(), NULL,0,'All pages have been processed, starting from beginning on next run.',0,'ENABLED','remove_old_page_versions',0)
- Method 1. You can mouse button (left button) click on the Insert button, and enter the above mentioned SQL data, mentioned here again.
You are done.
Now, if you click on the Browse button (folder tab),
you will see (click on image to enlarge) the following added as a new table row:
If you login into your Concrete5 control panel, and go to the Automated Jobs you will see it there now.
Feel Free To Leave A Good Comment. :)
Look around, and you may find other useful articles. Add this site to your Bookmarks/Favorites for easy return for new articles. Consider submitting technical articles for publication, including your embedded links. I will even create a new category if needed.