Creating and scheduling the SitemapGenerate job

You can schedule sitemaps generation. Using the Scheduler in the Administration Console, you can create a sitemaps job, or update an existing one.

For example, you might want to include any updates that are made to your catalog each day. When the scheduled job runs, it creates a sitemap.xml file, and a sitemap_storeId.xml.gz compressed file, which is based on your catalog information.

The job generates the sitemaps and stores them in the WAS_installdir/profiles/profile_name/temp/ directory.

If the sitemap is different from the one in the WebSphere Commerce EAR, the compressed file, sitemap_storeId.xml.gz, which contains the XML files, is then copied into the following directory:
  • SolarisLinuxWindowsAIXFor IBM i OS operating systemWC_eardir/Stores.war
  • WebSphere Commerce DeveloperWCDE_installdir/workspace/Stores/WebContent

Before you begin

Procedure

  1. Open the Administration Console and select Site on the Administration Console Site/Store Selection page.
  2. Click Configuration > Scheduler. A list of jobs that are scheduled to run is displayed.
  3. Create the SitemapGenerate job:
    1. Click New.
    2. Create the SitemapGenerate job with the following values:
      New Scheduled Job: SitemapGenerate
      Parameter Value
      Job command SitemapGenerate
      Job Parameters Type the following optional parameters of the command into a string representation of a URL query. For example, if you have more than one store, the URL query string representation to specify these parameters would be storeId_1=10001&storeId_2=10002. The following example displays how you would type in more than one parameter for your store:
      
      storeId=10101&maxUrlNumber=25&storeType=B2C
      
      Introduced in Feature Pack 3Note: For extended sites stores with sales catalogs, the catalogId must be passed for the sales catalog. For example,
      
      storeId=10101&maxUrlNumber=25&storeType=B2C&catalogId=10051
      storeId
      The store ID of the store for which the sitemap is generated.
      storeType
      Optional: This parameter is used to restrict the types of stores that can generate a sitemap. If a value is not specified, then all store types can generate a sitemap.
      Can be either B2C or B2B.
      maxUrlNumber
      Optional: The maximum number of URLs a sitemap is allowed to have. If value is not specified, the default value of 50,000 is used. A sitemap XML file cannot contain more than 50,000 URL entries.
      catalogId
      Optional: The catalog ID to generate URLs for. If no catalog ID is specified, the master catalog ID is used.
      validation
      Optional: This flag indicates whether the generated sitemap is validated against the sitemap schema. By default this value is set to false.
      compareFiles
      Optional: This flag indicates whether to compare the generated sitemap files with the files that were generated from the previous run. If the files are the same, no new files are generated. Default value is true.
      sitemapView
      Optional: On an SEO enabled store, SEOSitemapView is used to generate static page URLs. On stores without SEO enabled, this parameter can be used to specify the name of the view that is used as the sitemap template for specified store. If no sitemapView is specified, the default sitemap view DefaultSitemapView is used.
      HostName
      Optional: The host name of the production server that is used to host the sitemap.xml files. This parameter is required when the command is executed on a staging or remote server.
      uploadXMLToEAR

      WebSphere Commerce Version 7.0.0.6Optional: This flag indicates whether to upload the uncompressed generated sitemap XML files to the EAR directory (set to false by default). Both the compressed and uncompressed versions are uploaded.

      Note: Requires interim fix APAR JR40734. Included in fix pack 6 and above.
      updateEAR

      WebSphere Commerce Version 7.0.0.8Optional: This flag allows the caller to disable the EAR update (set to true by default). All files remain in the temporary directory.

      Note: Requires interim fix JR48186. Included in fix pack 8 and above.
      WebSphere Commerce Version 7.0.0.9useSearchKeywordForCategoryURL
      WebSphere Commerce Version 7.0.0.9Optional: This flag determines whether to use CategoryURL pattern or SearchCategoryURL pattern for building category URLs for site maps. The flag can be set to either true or false.

      By default, the value is set to true, which uses the "/search/" token in the site map. For example, www.myhost.com/en/aurora/search/categoryName.

      If you set the value to false, then the "/search/" token is not used. For example, www.myhost.com/en/aurora/categoryName.

      Note: Requires interim fix JR56132.
      Feature Pack 8productDisplayViewName
      Feature Pack 8The view name to use for generating the site map for products. If unspecified, the command defaults to the default product view for Aurora.
      Note: Requires interim fix JR56113
      Feature Pack 8categoryDisplayViewName
      Feature Pack 8The view name to use for generating the site map for categories. If unspecified, the command defaults to the default category view for Aurora.
      Note: Requires interim fix JR56113
      Start Date Enter the current date.
      Start time Enter a time that you want to start the job for the first time.
      Schedule Interval Type the number of seconds between successive runs of this job. If this parameter is omitted, the job is run only once. Typically this job is not scheduled to run regularly and is run as needed. If you find that you create many new products monthly, then you might want to run it more frequently.
      Job priority Enter 10 to indicate that the job is high priority.

      For more information about the full set of parameters for scheduled jobs, see Scheduling a site-level job.

    3. Click OK.

Results

Your job is listed on the Scheduler Status Display page and runs at the specified start time.