{"id":1705,"date":"2026-01-06T22:06:00","date_gmt":"2026-01-06T22:06:00","guid":{"rendered":"https:\/\/craftcookcode.com\/?p=1705"},"modified":"2026-01-06T22:06:03","modified_gmt":"2026-01-06T22:06:03","slug":"qlik-replicate-schedules-a-cron-with-an-extra-field","status":"publish","type":"post","link":"https:\/\/craftcookcode.com\/?p=1705","title":{"rendered":"Qlik Replicate Schedules &#8211; a CRON with an extra field?"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>To make our lives easier migrating Qlik Replicate tasks from one environment to another; I am looking how to migrate Qlik Replicate schedules.<\/p>\n\n\n\n<p>So far by GitLab pipelines we can migrate tasks and endpoint; but schedules we must do manually.&nbsp; Quite often we forget to manually create the schedules as they are not as obvious component compared to tasks and endpoints.&nbsp; If you move to a new environment and your task is not there, well that is a no brainer.&nbsp; If your endpoint is not there; your task will not migrate.<\/p>\n\n\n\n<p>But schedules are something that lurks in the background; inconsistently created when we rush to put them in when we realise the Qlik task did not run when it was meant to.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Plan<\/h2>\n\n\n\n<p>Using the python API, we can export all the items from a Qlik Replicate server with the export_all method.&nbsp; In the returned Json file will be the schedule details like this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: java; title: ; notranslate\" title=\"\">\n{\n    &quot;name&quot;: &quot;DEV_S004_GCS_DLA&quot;,\n    &quot;command_id&quot;: 25,\n    &quot;schedule&quot;: &quot;0 1 * * * *&quot;,\n    &quot;command_requests&quot;: {\n        &quot;cleanlogs_req&quot;: {\n            &quot;server&quot;: {},\n            &quot;task&quot;: {},\n            &quot;fts&quot;: {}\n        },\n        &quot;logfilerollover_req&quot;: {},\n        &quot;execute_req&quot;: {\n            &quot;task&quot;: &quot;&quot;,\n            &quot;operation&quot;: &quot;EXECUTE_OPERATIONS_BOTH&quot;,\n            &quot;flags&quot;: &quot;FRESH&quot;\n        },\n        &quot;stoptask_req&quot;: {\n            &quot;task&quot;: &quot;&quot;\n        }\n    },\n    &quot;task&quot;: &quot;DEV_T222_DL_LENDING_DLA&quot;,\n    &quot;is_local_time&quot;: true\n}\n<\/pre><\/div>\n\n\n<p>The idea is to modify the Json for the schedule to match the environment we are migrating to; put the schedule into a blank server Json template and use the import_all<\/p>\n\n\n\n<p>&nbsp;method to upload the new schedules to the destination server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Cron does not look right\u2026<\/h2>\n\n\n\n<p>Looking over the exported Json; the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Cron\" target=\"_blank\" rel=\"noopener\" title=\"\">cron syntax<\/a> did not look right.\u00a0 It had six fields instead of the expected five.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: java; title: ; notranslate\" title=\"\">\n&quot;schedule&quot;: &quot;0 1 * * * *&quot;\n<\/pre><\/div>\n\n\n<p>This confused me for a while as I haven&#8217;t come across a cron like this before.<\/p>\n\n\n\n<p>After coming up with no results searching Qlik&#8217;s documentation; I created some test schedules to try and determine what the sixth field is used for.<\/p>\n\n\n\n<p>Ahh. After a short while I found the answer.  <\/p>\n\n\n\n<p>If the schedule is a &#8220;Once off&#8221; run; the sixth field is used for &#8220;Year&#8221;.<\/p>\n\n\n\n<p>Here is an example below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"395\" height=\"400\" src=\"http:\/\/craftcookcode.com\/wp-content\/uploads\/2026\/01\/code_qr_schedules_02.png\" alt=\"\" class=\"wp-image-1708\" srcset=\"https:\/\/craftcookcode.com\/wp-content\/uploads\/2026\/01\/code_qr_schedules_02.png 395w, https:\/\/craftcookcode.com\/wp-content\/uploads\/2026\/01\/code_qr_schedules_02-296x300.png 296w\" sizes=\"(max-width: 395px) 100vw, 395px\" \/><\/figure>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: java; title: ; notranslate\" title=\"\">\n{\n\t&quot;name&quot;:\t&quot;Test&quot;,\n\t&quot;command_id&quot;:\t25,\n\t&quot;schedule&quot;:\t&quot;30 15 7 1 * 2026&quot;,\n\t&quot;command_requests&quot;:\t{\n\t\t&quot;cleanlogs_req&quot;:\t{\n\t\t\t&quot;server&quot;:\t{\n\t\t\t},\n\t\t\t&quot;task&quot;:\t{\n\t\t\t},\n\t\t\t&quot;fts&quot;:\t{\n\t\t\t}\n\t\t},\n\t\t&quot;logfilerollover_req&quot;:\t{\n\t\t},\n\t\t&quot;execute_req&quot;:\t{\n\t\t\t&quot;task&quot;:\t&quot;&quot;,\n\t\t\t&quot;operation&quot;:\t&quot;EXECUTE_OPERATIONS_BOTH&quot;,\n\t\t\t&quot;flags&quot;:\t&quot;FRESH&quot;\n\t\t},\n\t\t&quot;stoptask_req&quot;:\t{\n\t\t\t&quot;task&quot;:\t&quot;&quot;\n\t\t}\n\t},\n\t&quot;task&quot;:\t&quot;EIT_T002_OB_RFSB_ACCT_02&quot;,\n\t&quot;enabled&quot;:\tfalse\n}\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>Introduction To make our lives easier migrating Qlik Replicate tasks from one environment to another; I am looking how to migrate Qlik Replicate schedules. So far&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":1707,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[16],"tags":[101,36],"class_list":["post-1705","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-qlik-replicate","tag-cron","tag-qlikreplicate"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/craftcookcode.com\/index.php?rest_route=\/wp\/v2\/posts\/1705","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/craftcookcode.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/craftcookcode.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/craftcookcode.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/craftcookcode.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1705"}],"version-history":[{"count":2,"href":"https:\/\/craftcookcode.com\/index.php?rest_route=\/wp\/v2\/posts\/1705\/revisions"}],"predecessor-version":[{"id":1709,"href":"https:\/\/craftcookcode.com\/index.php?rest_route=\/wp\/v2\/posts\/1705\/revisions\/1709"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/craftcookcode.com\/index.php?rest_route=\/wp\/v2\/media\/1707"}],"wp:attachment":[{"href":"https:\/\/craftcookcode.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1705"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/craftcookcode.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1705"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/craftcookcode.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1705"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}