Create a crawler schedule - Amazon Glue
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Create a crawler schedule

You can create a schedule for the crawler using the Amazon Glue console or Amazon CLI.

Amazon Web Services Management Console
  1. Sign in to the Amazon Web Services Management Console, and open the Amazon Glue console at https://console.amazonaws.cn/glue/.

  2. Choose Crawlers in the navigation pane.

  3. Follow steps 1-3 in the Configuring a crawler section.

  4. In Step 4: Set output and scheduling, choose a Crawler schedule to set the frequency of the run. You can choose the crawler to run hourly, daily, weekly, monthly or define custom schedule using cron expressions.

    A cron expression is a string representing a schedule pattern, consisting of 6 fields separated by spaces: * * * * * <minute> <hour> <day of month> <month> <day of week> <year>

    For example, to run a task every day at midnight, the cron expression is: 0 0 * * ? *

    For more information, see Cron expressions.

  5. Review the crawler settings you configured, and create the crawler to run on a schedule.

Amazon CLI
aws glue create-crawler --name myCrawler \ --role AWSGlueServiceRole-myCrawler \ --targets S3Targets=[{Path="s3://amzn-s3-demo-bucket/"}] \ --schedule cron(15 12 * * ? *)

Crawls for each crawler is valid only for up to 12 months.

For more information about using cron to schedule jobs and crawlers, see Time-based schedules for jobs and crawlers.