Sitemap Scheduler Not Generating Sitemaps in AEM | Community
Skip to main content
Level 2
September 2, 2024
Question

Sitemap Scheduler Not Generating Sitemaps in AEM

  • September 2, 2024
  • 8 replies
  • 2705 views

I'm using AEM with the SitemapScheduler configuration to generate sitemaps on a scheduled basis. I've set up the scheduler with the following configuration:

 

{ "scheduler.name": "Practice Daily Sitemap Scheduler", "scheduler.expression": "* * * * *", "searchPath": "/content/practice/us" }

 

However, sitemaps are not being generated in /var/sitemaps, and I can't access them via the expected URLs. I've enabled on-demand sitemap generation, which is working fine. I've also ensured that the configuration file is placed under config.publish. Can someone help me identify why the scheduler isn't working as expected?

my crx de of author is : 


my crx de of publish is : 


when i turn on on demand sitemap generation it is getting generated like this : 


which is alright

the only problem is with the sitemap scheduler


please help me i have waited for one hour and still cannot see the sitemap 


Note : I am using aem as a cloud service sdk


 

8 replies

Kamal_Kishor
Community Advisor
Community Advisor
September 2, 2024

@nerodhana :Are you trying to generate this every minute, seems un-usual (based on your cron - * * * * *).
Please check if there are errors in logs regarding this.

 

nerodhanaAuthor
Level 2
September 2, 2024

i just took the wynd project and implemented on it if it works on that i want to implement in the actual project and i just want to quickly check if the sitemap is generated thats why i kept the cron expression to run for every minute

 

and the logs have no errors and looks something like this : 

 

02.09.2024 13:23:22.380 *INFO* [Apache Sling Repository Startup Thread #1] org.apache.sling.jcr.repoinit.impl.NodePropertiesVisitor Setting properties on nodePath '/var/workflow/models' 02.09.2024 13:23:22.381 *INFO* [Apache Sling Repository Startup Thread #1] org.apache.sling.jcr.repoinit.impl.NodePropertiesVisitor Property 'jcr:title' already set on path '/var/workflow/models', existing value will not be overwritten in 'default' mode 02.09.2024 13:23:22.381 *INFO* [Apache Sling Repository Startup Thread #1] org.apache.sling.jcr.repoinit.impl.NodePropertiesVisitor Setting properties on nodePath '/var/workflow' 02.09.2024 13:23:22.381 *INFO* [Apache Sling Repository Startup Thread #1] org.apache.sling.jcr.repoinit.impl.NodePropertiesVisitor Property 'sling:resourceType' already set on path '/var/workflow', existing value will not be overwritten in 'default' mode 02.09.2024 13:23:22.382 *INFO* [Apache Sling Repository Startup Thread #1] org.apache.sling.jcr.repoinit.impl.NodePropertiesVisitor Property 'sling:target' already set on path '/var/workflow', existing value will not be overwritten in 'default' mode 02.09.2024 13:23:22.382 *INFO* [Apache Sling Repository Startup Thread #1] org.apache.sling.jcr.repoinit.impl.NodePropertiesVisitor Property 'jcr:title' already set on path '/var/workflow', existing value will not be overwritten in 'default' mode 02.09.2024 13:23:22.383 *INFO* [Apache Sling Repository Startup Thread #1] org.apache.sling.jcr.repoinit.impl.NodeVisitor Path already exists, nothing to do (and not checking its primary type for now): /var 02.09.2024 13:23:22.383 *INFO* [Apache Sling Repository Startup Thread #1] org.apache.sling.jcr.repoinit.impl.NodeVisitor Path already exists, nothing to do (and not checking its primary type for now): /var/sitemaps 02.09.2024 13:23:22.384 *INFO* [Apache Sling Repository Startup Thread #1] org.apache.sling.jcr.repoinit.impl.UserVisitor Service user 'sitemap-writer-service' already exists with required intermediate path 'system/cq:services/internal', no changes made. 02.09.2024 13:23:22.384 *INFO* [Apache Sling Repository Startup Thread #1] org.apache.sling.jcr.repoinit.impl.AclVisitor Adding principal-based access control entry for sitemap-writer-service 02.09.2024 13:23:22.390 *INFO* [Apache Sling Repository Startup Thread #1] org.apache.sling.jcr.repoinit.impl.AclUtil Equivalent principal-based entry already exists for principal sitemap-writer-service and effective path /var/sitemaps 02.09.2024 13:23:22.393 *INFO* [Apache Sling Repository Startup Thread #1] org.apache.sling.jcr.repoinit.impl.UserVisitor Service user 'direct-counts-service' already exists with required intermediate path 'system/cq:services/internal', no changes made. 02.09.2024 13:23:22.393 *INFO* [Apache Sling Repository Startup Thread #1] org.apache.sling.jcr.repoinit.impl.AclVisitor Adding principal-based access control entry for direct-counts-service 02.09.2024 13:23:22.396 *INFO* [Apache Sling Repository Startup Thread #1] org.apache.sling.jcr.repoinit.impl.AclUtil Equivalent principal-based entry already exists for principal direct-counts-service and effective path /home/users/system/cq:services/internal/-AJgiJPHOUAj1ghlI-lI 02.09.2024 13:23:22.396 *INFO* [Apache Sling Repository Startup Thread #1] org.apache.sling.jcr.repoinit.impl.NodeVisitor Path already exists, nothing to do (and not checking its primary type for now): /etc 02.09.2024 13:23:22.396 *INFO* [Apache Sling Repository Startup Thread #1] org.apache.sling.jcr.repoinit.impl.NodeVisitor Path already exists, nothing to do (and not checking its primary type for now): /etc/dam

 

 

 

narendiran_ravi
Level 6
September 2, 2024

Hi, Can you check this in the publisher? Scheduler-based sitemap generation is for publish environment -https://experienceleague.adobe.com/en/docs/experience-manager-learn/sites/seo/sitemaps#sitemap-scheduler-osgi-configuration

nerodhanaAuthor
Level 2
September 2, 2024

checked on both author and publish individually but still did not worked on both of them iam using aem as a cloud service sdk is that might be the problem ?

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
September 2, 2024

Hi, 

What is the name of the configuration file you are using? You should be naming something like this:

org.apache.sling.sitemap.impl.SitemapScheduler~yourProject.cfg.json

On top of that, check if there are some issues in the log.

 

Hope this helps

 

Esteban Bustamante
nerodhanaAuthor
Level 2
September 2, 2024

yeah I have used like this : org.apache.sling.sitemap.impl.SitemapScheduler~wknd.cfg.json

for the wknd tutorial project but still it is not working so i removed the ~wknd part still it is not working

ManviSharma
Adobe Employee
Adobe Employee
September 2, 2024

Hi ,

Could you please ensure the configuration file name is correct. It should be named using the persistent identifier (PID) of the SitemapScheduler service. The correct PID for the SitemapScheduler is org.apache.sling.sitemap.impl.SitemapScheduler. So, your configuration file should be named org.apache.sling.sitemap.impl.SitemapScheduler-PracticeDailySitemapScheduler.cfg.json.

Regards,

Manvi

nerodhanaAuthor
Level 2
September 2, 2024

yes i have ensured the correct pid of the sitemap scheduler still it is not working. is it the problem with the short time i have given in scheduler like for every 1 minute it should generate sitemap ?

Level 2
September 5, 2024

Hi, is this resolved? I am facing the same issue.

September 6, 2024

I have been dealing with the same issue for about 4 days now, I've tried everything on the internet at this point and still cannot get the scheduler to trigger sitemap generation.

Level 2
September 6, 2024

I think your issue is the cron expression. You are using cron format but needs to be quartz format.

Another issue I came across is that anonymous user needs read access to var/sitemaps or you get 404.

September 8, 2024

You are the first person I've seen mention that the cron expression needs to be in quartz format. I will give it a try sometime today ! 

kautuk_sahni
Community Manager
Community Manager
September 13, 2024

@nerodhana Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni
June 18, 2025

Is your content published? and you are giving sling:sitemapRoot true ?
Also you have to make allOnDemand as false on author and publish.

October 15, 2025

How can I do that?