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:
  • LinuxAIXWindowsFor IBM i OS operating systemWC_eardir/Stores.war
  • WebSphere Commerce DeveloperWCDE_installdir/workspace/Stores/WebContent

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=MPS
      Note: For extended sites stores with sales catalogs, the catalogId must be passed for the sales catalog as shown in the following example:
      
      storeId=10101&maxUrlNumber=25&storeType=MPS&catalogId=10051
      storeId
      The store ID of the store for which the sitemap is generated.
      storeType
      This parameter is used to restrict the type of store that can have a sitemap generated. If a value is not specified, then there is no restriction on the store type of entered store IDs.
      It is the alphabetical value in the STORETYPE column for the corresponding STORE_ID value present in the STORE table.
      maxUrlNumber
      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
      The catalog ID to generate URLs for. If no catalog ID is specified, the master catalog ID is used.
      validation
      This flag indicates whether the generated sitemap must be validated against the sitemap schema. By default this value is set to false.
      compareFiles
      This flag indicates whether to do a file comparison of generated sitemap files with the files that are generated from last run. If the files are the same, no new files are generated. Default value is true.
      sitemapView
      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
      The host name of the production server that is used to host the sitemap.xml files. This parameter is needed when the command is executed on a staging or remote server.
      uploadXMLToEAR

      This flag indicates whether to upload the decompressed generated sitemap XML files to the EAR directory (set to false by default). Both the compressed and decompressed versions are uploaded.

      updateEAR

      This flag allows the caller to disable the EAR update (set to true by default). All files remain in the temporary directory.

      WebSphere Commerce Version 8.0.3.0 or latergenerateAlternateLanguage
      WebSphere Commerce Version 8.0.3.0 or later

      This flag indicates whether the sitemap URL tags must be generated with corresponding xhtml tags, which are set to false by default. Google's xhtml tag indicates links of the same web content in alternate languages. For more information about alternate languages and sitemaps, see Sitemap to indicate alternate language pages

      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 you create many new products monthly, 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.