Restore accidentally deleted automated job in 5.7

Permalink
Okay I did it. I have been using C5 for 6 years and never did this before.
For some reason, C5 team placed trash cans next to automated jobs and in an oversight, I eliminated the job "create sitemap.xml"
I saw some posts from 5.6, which involve mucking about in phpmyadmin, but when i went to look at the table in PHPmyadmin, the job was still there. (?)
Does any kind soul have a suggestion as to how I could replace that job in the Dashboard?
Thanks

arlenesey
 
mesuva replied on at Permalink Reply
mesuva
Are you sure it's still in the Jobs database table?
I just tried deleting a job on a scratch install and it did actually remove the corresponding row.

To restore it I think it requires reinserting the row.

Here's the SQL to re-install the generate sitemap job:
INSERT INTO `Jobs` (`jID`, `jName`, `jDescription`, `jDateInstalled`, `jDateLastRun`, `pkgID`, `jLastStatusText`, `jLastStatusCode`, `jStatus`, `jHandle`, `jNotUninstallable`, `isScheduled`, `scheduledInterval`, `scheduledValue`)
VALUES
   (4, 'Generate the sitemap.xml file', 'Generate the sitemap.xml file that search engines use to crawl your site.', '2016-09-19 09:28:55', NULL, 0, NULL, 0, 'ENABLED', 'generate_sitemap', 0, 0, 'days', 0);
arlenesey replied on at Permalink Reply
arlenesey
Hi!

I have to admit that I tried an old trick mentioned for 5.6, that I didn't think would work and inexplicably did:
In Filezilla
I removed the file "generate sitemap.xml" (which was still in the site folder, but not viewable in Automated jobs dashboard) from concrete/jobs, and placed it in application/jobs.
Refreshed
replaced it in the concrete/jobs folder
When I returned to the site and signed in, it was there. Go figure.

By the way, thanks for your quick reply. I am printing it out for my personal tips and tricks file...

sincerely
Arlene