Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Sitemap Scheduler Not Generating Sitemaps in AEM

Avatar

Level 2

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 : 

nerodhana_0-1725268310518.png


my crx de of publish is : 

nerodhana_1-1725268360444.png


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

nerodhana_2-1725268433779.png


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


 

15 Replies

Avatar

Community Advisor

@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.

 

Avatar

Level 2

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

 

 

 

Avatar

Level 4

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

Avatar

Level 2

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 ?

Avatar

Community Advisor

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

Avatar

Level 2

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

Avatar

Employee Advisor

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

Avatar

Level 2

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 ?

Avatar

Level 1

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

Avatar

Level 2

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.

Avatar

Level 1

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.

Avatar

Level 2

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 ! 

Avatar

Level 2

Could you please share how you provided access to this user to ? 

Avatar

Level 1

There are different ways but the best is repoinit script under config.publish. It is surprising that non of the Adobe docs or guides mention this.

 

set ACL for anonymous
allow jcr:read on /var/sitemaps
end

Avatar

Administrator

@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