{"id":11659,"date":"2023-05-08T10:10:27","date_gmt":"2023-05-08T17:10:27","guid":{"rendered":"https:\/\/www.coretechnologies.com\/blog\/?p=11659"},"modified":"2024-11-23T09:35:42","modified_gmt":"2024-11-23T17:35:42","slug":"daily-woocommerce-import","status":"publish","type":"post","link":"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/daily-woocommerce-import\/","title":{"rendered":"Q&#038;A: Can AlwaysUp Trigger a Daily Import into my WooCommerce Site?"},"content":{"rendered":"<div align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"no-lazy-load\" src=\"\/blog\/images\/qa-daily-woocommerce-import.webp\" style=\"margin-bottom:20px;\" title=\"Can AlwaysUp Trigger a Daily Import into my WooCommerce Site?\" alt=\"Can AlwaysUp Trigger a Daily Import into my WooCommerce Site?\" border=\"0\" width=\"380\" height=\"160\" \/><\/div>\n<div class=\"blog-qa-question-box\">\n<img loading=\"lazy\" decoding=\"async\" class=\"no-lazy-load\" src=\"https:\/\/cdn.coretechnologies.com\/images\/quotes-transparent-21x21.webp\" width=\"21\" height=\"21\" \/>&nbsp;&nbsp;We&#8217;re using <a href=\"https:\/\/www.wpallimport.com\/\" target=\"_blank\" rel=\"noopener\">WP All Import<\/a> to import a CSV file into a <a href=\"https:\/\/woocommerce.com\/\" target=\"_blank\" rel=\"noopener\">WooCommerce<\/a> site.<\/p>\n<p>Can I use AlwaysUp to set up a nightly task that triggers WP All Import to perform the import, as described in <a href=\"https:\/\/www.wpallimport.com\/documentation\/cron\/\" target=\"_blank\" rel=\"noopener\">this article<\/a>?<\/p>\n<p>Our site is running on Linux but our VPS provider doesn&#8217;t allow us to add a &#8220;cron job&#8221; to the machine and I&#8217;m hoping that AlwaysUp can help. We already use it for a couple of older Windows programs.<\/p>\n<p align=\"right\">&mdash; Patrick S.<\/p>\n<\/div>\n<p>Hi Patrick, thanks for reaching out. And thanks for being a customer!<\/p>\n<p>Yes, AlwaysUp can help definitely run your nightly task. <\/p>\n<p>Basically, you should create batch files that import the data and then instruct AlwaysUp to kick off the batch files at scheduled times.<\/p>\n<p>Let&#8217;s go through the process, step by step.<\/p>\n<h2 class=\"blog-caption-numbered\">1. Create the &#8220;trigger&#8221; and &#8220;processing&#8221; batch files<\/h2>\n<p>Follow the instructions in the <a href=\"https:\/\/www.wpallimport.com\/documentation\/cron\/\" target=\"_blank\" rel=\"noopener\">article you sent<\/a> to create a couple of batch files.<\/p>\n<p>The first batch file imports the data. It will run nightly, at a time of your choosing. Let&#8217;s call it the &#8220;trigger batch file&#8221;.<\/p>\n<p>The second ensures that all data previously imported is fully processed, so we call it the &#8220;processing batch file&#8221;. It will run every couple of minutes.<\/p>\n<p>Both scripts work by calling a special URL on your WooCommerce site. We recommend using the free <a href=\"https:\/\/curl.se\/windows\/\" target=\"_blank\" rel=\"noopener\">cURL<\/a> command line utility to help with that.<\/p>\n<p>For example, the trigger batch file should contain a single line:<\/p>\n<div class=\"code-box\">\nC:\\apps\\curl\\curl.exe http:\/\/YOUR-WEBSITE.com\/wp-load.php?import_key=[YOUR_SECRET_KEY]&#038;import_id=[YOUR_IMPORT_ID]&#038;action=trigger\n<\/div>\n<p>And the processing batch file will be very similar (notice the small variation in the URL parameter):<\/p>\n<div class=\"code-box\">\nC:\\apps\\curl\\curl.exe http:\/\/YOUR-WEBSITE.com\/wp-load.php?import_key=[YOUR_SECRET_KEY]&#038;import_id=[YOUR_IMPORT_ID]&#038;action=processing\n<\/div>\n<p>Note that the path to curl.exe will be different on your system. Be sure to specify the correct path in your files and save them to a well-known location.<\/p>\n<p>Our next job is to plug those files into AlwaysUp. Let&#8217;s start with the trigger batch file.<\/p>\n<h2 class=\"blog-caption-numbered\">2. Add the trigger batch file to AlwaysUp<\/h2>\n<p>To have AlwaysUp run the trigger batch file every night:<\/p>\n<ol style=\"margin-bottom:24px\">\n<li>\n<p>Start AlwaysUp<\/p>\n<\/li>\n<li>\n<p>Select <b>Application &gt; Add<\/b> to open the <b>Add Application<\/b> window<\/p>\n<\/li>\n<li>\n<p>In the <b>Application<\/b> field, enter the full path to the trigger batch file<\/p>\n<\/li>\n<li>\n<p>In the <b>Name<\/b> field, enter a suitable name (we called ours &#8220;Trigger Import&#8221;)<\/p>\n<div align=\"center\"><a href=\"\/blog\/images\/trigger-import-general-tab.png\" class=\"zoomPopup\" title=\"Trigger Import: General tab\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"image-padding\" src=\"\/blog\/images\/trigger-import-general-tab.png\" title=\"Trigger Import: General tab (click to enlarge)\" alt=\"Trigger Import: General tab\" border=\"0\" \/><\/a><\/div>\n<\/li>\n<li>\n<p>Switch to the <b>Logon<\/b> tab. Check the box at the top and enter your Windows username and password:<\/p>\n<div align=\"center\"><a href=\"\/blog\/images\/trigger-import-logon-tab.png\" class=\"zoomPopup\" title=\"Trigger Import: Logon tab\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"image-padding\" src=\"\/blog\/images\/trigger-import-logon-tab.png\" title=\"Trigger Import: Logon tab (click to enlarge)\" alt=\"Trigger Import: Logon tab\" border=\"0\" \/><\/a><\/div>\n<\/li>\n<li>\n<p>Switch to the <b>Restart<\/b> tab. Here&#8217;s where you will set the batch file to run nightly.<\/p>\n<\/li>\n<li>\n<p>Specify the time to run, ensure that the first run happens at the set time and minimize logging, as pictured:<\/p>\n<div align=\"center\"><a href=\"\/blog\/images\/trigger-import-restart-tab.png\" class=\"zoomPopup\" title=\"Trigger Import: Restart tab\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"image-padding\" src=\"\/blog\/images\/trigger-import-restart-tab.png\" title=\"Trigger Import: Restart tab (click to enlarge)\" alt=\"Trigger Import: Restart tab\" border=\"0\" \/><\/a><\/div>\n<\/li>\n<li>\n<p>Click the <b>Save<\/b> button to record your new task.<\/p>\n<\/li>\n<li>\n<p>And finally, select <b>Application &gt; Start<\/b> to launch the nightly process.<\/p>\n<\/li>\n<\/ol>\n<h2 class=\"blog-caption-numbered\">2. Add the processing batch file to AlwaysUp<\/h2>\n<p>To install the processing batch file, follow the same steps you took to setup the trigger batch file. Other than the obvious variations &mdash; such as the name and the path to the batch file &mdash; specify a two minute interval as pictured here:<\/p>\n<div align=\"center\"><a href=\"\/blog\/images\/process-data-restart-tab.png\" class=\"zoomPopup\" title=\"Process Data: Restart tab\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"image-padding\" src=\"\/blog\/images\/process-data-restart-tab.png\" title=\"Process Data: Restart tab (click to enlarge)\" alt=\"Process Data: Restart tab\" border=\"0\" \/><\/a><\/div>\n<h2 class=\"blog-caption\">AlwaysUp will run both batch files on your WooCommerce site as specified<\/h2>\n<p>With your two periodic tasks installed and managed by AlwaysUp, WP All Import will download your CSV file and update, delete, and create posts on your site according to your settings &mdash; every night.<\/p>\n<p style=\"margin-top: 30px\">\nBest of luck with your WooCommerce site!<\/p>\n<!-- relpost-thumb-wrapper --><div class=\"relpost-thumb-wrapper\"><!-- filter-class --><div class=\"relpost-thumb-container\"><style>.relpost-block-single-image, .relpost-post-image { margin-bottom: 10px; }<\/style><h3>You may also like...<\/h3><div style=\"clear: both\"><\/div><div style=\"clear: both\"><\/div><!-- relpost-block-container --><div class=\"relpost-block-container relpost-block-column-layout\" style=\"--relposth-columns: 3;--relposth-columns_t: 2; --relposth-columns_m: 2\"><a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/onedrive-fails-in-session-0\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"Investigating OneDrive Failures in Session 0 on Windows Server\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/onedrive-not-synching-files-150x150-1.png\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">Investigating OneDrive Failures in Session 0 on Windows Server<\/h2><\/div><\/div><\/a><a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/onedrive-folder-permissions\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"Q&amp;A: Why Can&#039;t OneDrive Find my Folder?\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/onedrive-security-150x150-1.png\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">Q&amp;A: Why Can&#039;t OneDrive Find my Folder?<\/h2><\/div><\/div><\/a><a href=\"https:\/\/www.coretechnologies.com\/blog\/software\/schedule-backup-and-sync\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"Backup and Sync getting in the way? Run it off-hours, when you&#039;re not around\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/backup-and-sync-150x150.png\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">Backup and Sync getting in the way? Run it off-hours, when you&#039;re not around<\/h2><\/div><\/div><\/a><\/div><!-- close relpost-block-container --><div style=\"clear: both\"><\/div><\/div><!-- close filter class --><\/div><!-- close relpost-thumb-wrapper -->","protected":false},"excerpt":{"rendered":"<p>&nbsp;&nbsp;We&#8217;re using WP All Import to import a CSV file into a WooCommerce site. Can I use AlwaysUp to set up a nightly task that triggers WP All Import to perform the import, as described in this article? Our site &hellip; <a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/daily-woocommerce-import\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":11680,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[26,302,301,306],"class_list":["post-11659","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-alwaysup","tag-alwaysup-tag","tag-cron","tag-woocommerce","tag-wpallimport"],"_links":{"self":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/11659","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=11659"}],"version-history":[{"count":12,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/11659\/revisions"}],"predecessor-version":[{"id":12779,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/11659\/revisions\/12779"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/media\/11680"}],"wp:attachment":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=11659"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=11659"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=11659"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}