Creating a schedule name in Analytics Pod

Use this information to create a schedule name to synchronize with the selected time zone. This information is applicable for both Batch Analytics and Busy Hour job configurations

About this task

Follow these steps to create a schedule name to match with the selected time zone and time period:

Procedure

  1. Log in to your Cloud platform web console on your primary cluster.
  2. Make sure that you are in the correct project where you installed Telco Network Cloud Manager - Performance.
    For example, noi or tncp project.
  3. Click Workloads > Pods > analytics-batch-0 .
  4. Click Terminal and enter the following command:


    Click Exec into pod and enter the following API command:

    curl 'http://localhost:30028/rest/schedules/create' -d '{"CRONSCHEDULE":"0 15 * ? * * *","TZ":"<Timezone>","DESCRIPTION":"<Runs every hour at minute 0 on the hour>","CALENDAR":"","SCHEDULENAME":"<schedule_name>"}'
    {"status":"success","msg":"createdRow:1/1"}
    Note: Schedule names can include alphanumeric characters and underscore. The names are case insensitive. Use unique names.
    For example,
    curl 'http://localhost:30028/rest/schedules/create' -d '{"CRONSCHEDULE":"0 15 * ? * * *","TZ":"Asia/Kuala_Lumpur","DESCRIPTION":"Runs every hour at minute 0 on the hour","CALENDAR":"","SCHEDULENAME":"EVERYHOURKL"}'
    {"status":"success","msg":"createdRow:1/1"}
  5. Verify the new schedule name is added by using the following steps:
    1. Click Workloads > Pods > postgres-0.
    2. Click Terminal or Exec into pod and follow these steps:
    3. Connect to the PostgreSQL by using the following command:
      psql -U postgres
    4. List the tables in the schema with the following command:
      \dt analytics.
      List of relations
        Schema   |        Name         | Type  |  Owner   
      -----------+---------------------+-------+----------
       analytics | analytics_jobs      | table | postgres
       analytics | batch_history       | table | postgres
       analytics | dashboard_analytics | table | postgres
       analytics | schedules           | table | postgres
      (4 rows)
    5. Verify that the schedule name is added to the table with the following command:
      select * from analytics.schedules;
       cronschedule   |        tz         |                    description                     | calendar |    schedulename     
      -----------------+-------------------+----------------------------------------------------+----------+---------------------
       0 15 0 ? * * *  | Asia/Kolkata      | Runs every day at 12 midnight at minute 15         |          | EVERYDAYIST
       0 0 * ? * * *   | Asia/Kolkata      | Runs every hour at minute 0 on the hour            |          | EVERYHOURIST
       0 10 * ? * * *  | Asia/Kolkata      | Runs every hour at minute 10 on the hour           |          | EVERYHOURBYMIN10IST
       0 0 * ? * * *   | Asia/Kuala_Lumpur | Runs every hour at minute 0 on the hour            |          | EVERYHOUR_KL
       0 15 0 ? * * *  | Pacific/Auckland  | Runs every day at 12 midnight at minute 15         |          | EVERYDAY_AUCKLAND
       0 15 0 ? * * *  | Europe/Monaco     | Runs every day at 12 midnight at minute 15         |          | EVERYDAYMONACO
       0 15 0 ? * * *  | America/New_York  | Runs every day at 12 midnight at minute 15         |          | EVERYDAY_New_York
       0 0 * ? * * *   | Asia/Katmandu     | Runs every hour at minute 0 on the hour            |          | EVERYHOUR_np530
       0 15 0 ? * * *  | Asia/Katmandu     | Runs every day at 12 midnight at minute 15         |          | EVERYDAY_np530
       0 0 * ? * * *   | Asia/Kolkata      | Runs every hour at minute 0 on the hour            |          | EVERYHOUR
       0 10 * ? * * *  | Asia/Kolkata      | Runs every hour at minute 10 on the hour           |          | EVERYHOURBYMIN10
       0 15 0 ? * * *  | Asia/Kolkata      | Runs every day at 12 midnight at minute 15         |          | EVERYDAY
       0 0 2 ? * * *   | Asia/Kolkata      | Runs every day at 2 am at minute 0                 |          | EVERYDAYBYHOUR2
       0 0 0 ? * MON   | Asia/Kolkata      | Runs every week at 12 midnight at monday           |          | EVERYWEEK
       0 0 0 1 * ?     | Asia/Kolkata      | Runs every 1st of month at 12 midnight at minute 0 |          | EVERYMONTH
       0 15 * ? * * * | Asia/Kuala_Lumpur | Runs every hour at minute 0 on the hour                 |          | EVERYHOURKL
      (16 rows)

Results

You can see the newly added schedule name in the Schedule name list in the Batch Analytics configuration page.