Generate the sitemap.xml file under Automated Jobs

Permalink
I accidentally deleted the Generate the sitemap.xml file option under Automated Jobs. How do I get it back? I don't see anywhere to add new Automated Jobs back in.

walkingstick
 
webpresso replied on at Permalink Reply 1 Attachment
webpresso
Hi walkinstick

If you have access to your files you could copy the job back to /concrete/jobs/

you can learn more on these in the documentation section:
http://documentation.concrete5.org/developers/jobs/creating-a-job...

i attached the job file for concrete5 7.5.x in this answer.
best regards, roland
walkingstick replied on at Permalink Reply
walkingstick
Thanks for the reply. I actually went to upload your attached file, but the file: generate_sitemap.php was already there.

On the page you referenced it says:

"Any job found within the application/jobs directory still needs to be installed before it can be run. This can easily be done through the Dashboard > System & Settings > Optimization > Jobs Dashboard page. Uninstalled Jobs appear at the bottom of the page."

The problem is, there are no "Uninstalled Jobs" at the bottom of the page.

BTW, I lost this in the first place by clicking the trash can icon next to the job: "Remove this job".
webpresso replied on at Permalink Best Answer Reply
webpresso
Ah I see. Then you could do this:

Copy the jobfile "generate_sitemap.php" to /applications/jobs/
Open this file with a text editor and change the namespace from:

namespace Concrete\Job;

to
namespace Application\Job;


Save that file. And go to the your job section in concrete5. Then you can install that job.
Tested this locally now on a installation.

Another way would be to insert it again to the database by executing a sql-script. But this should work for you as described above.

best regards, Roland
walkingstick replied on at Permalink Reply
walkingstick
That did the trick. Thanks so much!