{"id":835,"date":"2006-09-07T22:39:51","date_gmt":"2006-09-08T03:39:51","guid":{"rendered":"http:\/\/blogs.terrorware.com\/geoff\/2006\/09\/07\/online-inventory-replication-batch-program-update\/"},"modified":"2006-09-07T22:39:51","modified_gmt":"2006-09-08T03:39:51","slug":"online-inventory-replication-batch-program-update","status":"publish","type":"post","link":"https:\/\/blogs.terrorware.com\/geoff\/2006\/09\/07\/online-inventory-replication-batch-program-update\/","title":{"rendered":"online inventory replication batch program update"},"content":{"rendered":"<p>The Boxcar online inventory replication program wrapper batch file wasn&#8217;t working right because the SSH tunnel to the MySQL server kept dying.  So, I modified the wrapper to test to make sure the server was up and then restart the service if it&#8217;s not before running the replication.  The code looks like this:<\/p>\n<blockquote>\n<pre>mysql --user=*** --password=*** --batch --execute=\"SELECT value FROM online_status WHERE config = 'online'\" boxcar_mirror\r\nIF NOT %ERRORLEVEL% NEQ 0 GOTO REP\r\nnet stop \"MySQLTunnel\"\r\nnet start \"MySQLTunnel\"\r\n:REP\r\ncd \"C:\\Documents and Settings\\n\\Desktop\\inventory and sales\\online stuff\\\"\r\n.\\BoxcarReplicator\r\n.\\shutdown -u<\/pre>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>The Boxcar online inventory replication program wrapper batch file wasn&#8217;t working right because the SSH tunnel to the MySQL server kept dying. So, I modified the wrapper to test to make sure the server was up and then restart the service if it&#8217;s not before running the replication. The code looks like this: mysql &#8211;user=***&hellip; <a class=\"more-link\" href=\"https:\/\/blogs.terrorware.com\/geoff\/2006\/09\/07\/online-inventory-replication-batch-program-update\/\">Continue reading <span class=\"screen-reader-text\">online inventory replication batch program update<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[21288,143,129,56],"class_list":["post-835","post","type-post","status-publish","format-standard","hentry","category-boxcar","tag-boxcar","tag-code-2","tag-development","tag-inventory","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4wnIz-dt","_links":{"self":[{"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts\/835","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/comments?post=835"}],"version-history":[{"count":0,"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts\/835\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/media?parent=835"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/categories?post=835"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/tags?post=835"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}