{"id":2220,"date":"2026-01-15T01:54:39","date_gmt":"2026-01-15T01:54:39","guid":{"rendered":"https:\/\/devad.io\/guides\/?p=2220"},"modified":"2026-01-28T18:21:17","modified_gmt":"2026-01-28T18:21:17","slug":"automations-cron-job","status":"publish","type":"post","link":"https:\/\/devad.io\/guides\/chat-devad-io-docs\/automations-cron-job\/","title":{"rendered":"Automations &amp; Cron Job"},"content":{"rendered":"\n<div class=\"gspb_heading_sep_gsbp-2e3a882\"><div class=\"gspb_heading_sep gspb_heading_sep_before\"><\/div><h2 id=\"gspb_heading-id-gsbp-2e3a882\" class=\"gspb_heading gspb_heading-id-gsbp-2e3a882 \">Cron job<\/h2><div class=\"gspb_heading_sep gspb_heading_sep_after\"><\/div><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li> CHAT.devad.io tries to process emails via cron jobs every 60 seconds, details <a href=\"#cron-jobs\">here<\/a>. <\/li>\n\n\n\n<li> If you&#8217;re using the <a href=\"#cloud-version\" class=\"scroll-to\">cloud version<\/a> the cron job is already activated by default and it will run at least once every 60 minutes. <\/li>\n\n\n\n<li> You can manually trigger execution and speed up cron jobs via API with the PHP function <a href=\"api\/php#email_piping\">sb_email_piping()<\/a>, or the WEB API function <a href=\"api\/web#email-piping\">email-piping<\/a>. <\/li>\n\n\n\n<li>You can create a cron job that runs the URL <b>https:\/\/chat.devad.io\/script\/include\/api.php?piping=true&amp;cloud=API-TOKEN<\/b> and replace <b>API-TOKEN<\/b> with your <a href=\"#cloud-info\" class=\"scroll-to\">API token<\/a>.<\/li>\n\n\n\n<li> If you manually run the cron job, activate the <b>Disable cron job<\/b> option to stop CHAT.devad.io from manually triggering it and to improve performance. <\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<div id=\"pusher\" style=\"position:relative;top:-100px;visibility:hidden;\"><\/div>\n\n\n\n<div class=\"gspb_heading_sep_gsbp-679ec2c\"><div class=\"gspb_heading_sep gspb_heading_sep_before\"><\/div><h2 id=\"gspb_heading-id-gsbp-679ec2c\" class=\"gspb_heading gspb_heading-id-gsbp-679ec2c \">Run the AI training via cron job<\/h2><div class=\"gspb_heading_sep gspb_heading_sep_after\"><\/div><\/div>\n\n\n\n<p>just enable the <b>Settings &gt; Artificial Intelligence &gt; OpenAI &gt; Training via cron job<\/b> option and the cron job will be activated. You can disregard the instructions below.<\/p>\n\n\n\n<p>To automatically train the chatbot with your website content at regular intervals, create a cron job that runs the URL <b>https:\/\/chat.devad.io\/include\/api.php?open-ai-training=true<\/b>, or use the command <b>*\/59 * * * * wget https:\/\/chat.devad.io\/include\/api.php?open-ai-training=true<\/b> to run it via a command. Replace <b>https:\/\/chat.devad.io<\/b> with your Installation URL, get it from <b>Settings &gt; Miscellaneous &gt; Installation URL<\/b>. use this URL: <b>https:\/\/chat.devad.io\/script\/include\/api.php?open-ai-training=true&amp;cloud=API-TOKEN<\/b> and replace <b>API-TOKEN<\/b> with your <a href=\"#cloud-info\" class=\"scroll-to\">API token<\/a>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>the cron job can be executed at most once every 7 days. <\/li>\n\n\n\n<li> We strongly recommand providing an XML sitemap instead of the website URL for performance reasons. <\/li>\n\n\n\n<li> Automatic training is limited to websites; files, Q&amp;A, and articles are excluded. Re-training will delete the previous website training data. <\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<div class=\"gspb_heading_sep_gsbp-027380e\"><div class=\"gspb_heading_sep gspb_heading_sep_before\"><\/div><h2 id=\"gspb_heading-id-gsbp-027380e\" class=\"gspb_heading gspb_heading-id-gsbp-027380e \">More about Cron Jobs<\/h2><div class=\"gspb_heading_sep gspb_heading_sep_after\"><\/div><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li> Cron jobs are executed by the first user that visit the website at any given hour of the day. <\/li>\n\n\n\n<li> Cron jobs are executed every 60 minutes (60 seconds for email piping), but it can take longer, or it can take less time as well, in relation to the traffic of your website. <\/li>\n\n\n\n<li> Because cron jobs are initiated by users, if you have less than 1 visitor per hour (per minute for email piping), it could take longer. As long as there is at least one active user on the site, execution every 60 minutes (60 seconds for email piping) is guaranteed. <\/li>\n\n\n\n<li> You can speed up the cron jobs execution by manually run them via <a href=\"https:\/\/chat.devad.io\/docs\/api\/web#cron-jobs\">WEB API<\/a>, or <a href=\"https:\/\/chat.devad.io\/docs\/api\/php#cron_jobs\">PHP API<\/a>. <\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<div id=\"automations\" style=\"position:relative;top:-100px;visibility:hidden;\"><\/div>\n\n\n\n<div class=\"gspb_heading_sep_gsbp-0470892\"><div class=\"gspb_heading_sep gspb_heading_sep_before\"><\/div><h2 id=\"gspb_heading-id-gsbp-0470892\" class=\"gspb_heading gspb_heading-id-gsbp-0470892 \">Automations<\/h2><div class=\"gspb_heading_sep gspb_heading_sep_after\"><\/div><\/div>\n\n\n\n<p>Automations allow running <a href=\"#multilingual\" class=\"scroll-to\">multilingual<\/a>\n                                automatic tasks when conditions set by you are met.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li> To delete a condition, set it to empty. To disable an automation, delete all conditions. <\/li>\n\n\n\n<li> Automations are sent only 1 time to users. <\/li>\n\n\n\n<li> If you used an automation in the past, and users already received it, you need to delete the automation and create a new one to show it to the users. <\/li>\n\n\n\n<li> <b>Repeat<\/b> only works if used in conjunction with <b>date time<\/b>. <\/li>\n\n\n\n<li> When <b>date time<\/b> is used in conjunction with the criteria <b>is exactly<\/b>, the value must not contain hours and minutes (hh:mm). Ex. 25\/10\/2021 (25\/10\/2021 10:30 will not work). <\/li>\n\n\n\n<li> The <b>Settings &gt; Users &gt; Register all visitors<\/b> option must be active if there are message automations that are executed on page load. <\/li>\n\n\n\n<li> <b>City<\/b>, <b>countries<\/b>, <b>languages<\/b> work automatically only if both the settings <b>Settings &gt; Users &gt; Register all visitors<\/b> and <b>Settings &gt; Users &gt; Full visitor details<\/b> are enabled. <\/li>\n\n\n\n<li> <b>Cities<\/b> work only if the user detail <b>location<\/b> is set and equal to <b>city, country<\/b>, or if the user detail <b>city<\/b> is set. <\/li>\n\n\n\n<li> <b>Countries<\/b> work only if the user details <b>country_code<\/b>, or <b>country<\/b> is set, or if the user detail <b>location<\/b> is set and equal to <b>city, country<\/b>. The country name must be in english. <\/li>\n\n\n\n<li> <b>languages<\/b> work only if the user details <b>browser_language<\/b>, or <b>language<\/b> is set. <\/li>\n\n\n\n<li> A visitor is a <b>Returning visitor<\/b> only if it visits the website again after 24h or more. <\/li>\n\n\n\n<li> The pop-ups appear only if the chat is closed, and they overwrite the default pop-up. You can check the <b>message fallback<\/b> option to send a message instead of showing the pop-up if the chat is open. <\/li>\n\n\n\n<li> You may need to enable <b>Settings &gt; Users &gt; Register all visitors<\/b> if you want to send an automated message to new users. <\/li>\n\n\n\n<li> Chat messages and popup fallback messages are sent only if the last user or agent message of the conversation is older than 10 minutes. This feature prevents unwanted automated messages to be sent during an agent-user conversation. <\/li>\n\n\n\n<li> The <b>Custom variable<\/b> condition check for the JavaScript variables with the given names and values. For example, the condition <b>example=ABC<\/b> is met if into the chat&#8217;s page there is this JavaScript code: <b>var example = &#8220;ABC&#8221;;<\/b>. Add multiple variables separated by commas. <\/li>\n\n\n\n<li> Automations are not compatible with the messaging apps like WhatsApp, Messenger, Instagram, Telegram, Twitter, Zalo, WeChat, Viber, Line. <\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>just enable the Settings &gt; Artificial Intelligence &gt; OpenAI &gt; Training via cron job option and the cron job will be activated. You can disregard&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_gspb_post_css":"@media (max-width:575.98px){#gspb_heading-id-gsbp-2e3a882{font-size:19px}}.gspb_heading_sep_gsbp-2e3a882>.gspb_heading_sep{width:40px;border-top-width:3px;border-top-color:var(u002du002dwpu002du002dpresetu002du002dcoloru002du002dvivid-purple, #9b51e0);border-top-style:double}.gspb_heading_sep_gsbp-2e3a882 .gspb_heading_sep_before{margin-right:17px;margin-left:17px}#gspb_heading-id-gsbp-0470892,#gspb_heading-id-gsbp-2e3a882{background-image:linear-gradient(135deg,#0693e3 0,#9b51e0 100%);margin-top:0;margin-bottom:0;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;text-fill-color:transparent}.gspb_heading_sep_gsbp-0470892,.gspb_heading_sep_gsbp-2e3a882{display:flex;align-items:center;justify-content:space-around;margin-bottom:0}.gspb_heading_sep_gsbp-0470892>.gspb_heading_sep{width:40px;border-top-width:3px;border-top-color:var(u002du002dwpu002du002dpresetu002du002dcoloru002du002dvivid-purple, #9b51e0);border-top-style:double}.gspb_heading_sep_gsbp-0470892 .gspb_heading_sep_before{margin-right:17px;margin-left:17px}@media (max-width:575.98px){#gspb_heading-id-gsbp-679ec2c{font-size:19px}}.gspb_heading_sep_gsbp-679ec2c>.gspb_heading_sep{width:40px;border-top-width:3px;border-top-color:var(u002du002dwpu002du002dpresetu002du002dcoloru002du002dvivid-purple, #9b51e0);border-top-style:double}.gspb_heading_sep_gsbp-679ec2c .gspb_heading_sep_before{margin-right:17px;margin-left:17px}#gspb_heading-id-gsbp-027380e,#gspb_heading-id-gsbp-679ec2c{background-image:linear-gradient(135deg,#0693e3 0,#9b51e0 100%);margin-top:0;margin-bottom:0;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;text-fill-color:transparent}.gspb_heading_sep_gsbp-027380e,.gspb_heading_sep_gsbp-679ec2c{display:flex;align-items:center;justify-content:space-around;margin-bottom:0}.gspb_heading_sep_gsbp-027380e>.gspb_heading_sep{width:40px;border-top-width:3px;border-top-color:var(u002du002dwpu002du002dpresetu002du002dcoloru002du002dvivid-purple, #9b51e0);border-top-style:double}.gspb_heading_sep_gsbp-027380e .gspb_heading_sep_before{margin-right:17px;margin-left:17px}","pgc_sgb_lightbox_settings":"","footnotes":"","_siteseo_titles_title":"","_siteseo_titles_desc":"","_siteseo_analysis_target_kw":"","_siteseo_robots_canonical":"","_siteseo_robots_index":"","_siteseo_robots_follow":"","_siteseo_robots_primary_cat":"","_siteseo_social_fb_title":"","_siteseo_social_fb_desc":"","_siteseo_social_fb_img":"","_siteseo_social_twitter_title":"","_siteseo_social_twitter_desc":"","_siteseo_social_twitter_img":""},"categories":[2,115],"tags":[104],"class_list":["post-2220","post","type-post","status-publish","format-standard","hentry","category-chat-devad-io-docs","category-settings-area","tag-chat-devad-io"],"acf":[],"menu_order":0,"_links":{"self":[{"href":"https:\/\/devad.io\/guides\/wp-json\/wp\/v2\/posts\/2220","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devad.io\/guides\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devad.io\/guides\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devad.io\/guides\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/devad.io\/guides\/wp-json\/wp\/v2\/comments?post=2220"}],"version-history":[{"count":1,"href":"https:\/\/devad.io\/guides\/wp-json\/wp\/v2\/posts\/2220\/revisions"}],"predecessor-version":[{"id":2221,"href":"https:\/\/devad.io\/guides\/wp-json\/wp\/v2\/posts\/2220\/revisions\/2221"}],"wp:attachment":[{"href":"https:\/\/devad.io\/guides\/wp-json\/wp\/v2\/media?parent=2220"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devad.io\/guides\/wp-json\/wp\/v2\/categories?post=2220"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devad.io\/guides\/wp-json\/wp\/v2\/tags?post=2220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}