<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>logIt &#187; job automation</title>
	<atom:link href="https://lakm.us/logit/tag/job-automation/feed/" rel="self" type="application/rss+xml" />
	<link>https://lakm.us/logit</link>
	<description>Log Around The Clock</description>
	<lastBuildDate>Sat, 06 Jun 2015 14:17:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Nebri Automation for Weather Feed to Twitter</title>
		<link>https://lakm.us/logit/2015/06/nebri-automation-weather-feed-twitter/</link>
		<comments>https://lakm.us/logit/2015/06/nebri-automation-weather-feed-twitter/#comments</comments>
		<pubDate>Tue, 02 Jun 2015 14:13:39 +0000</pubDate>
		<dc:creator>Arif</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[job automation]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[socialmedia]]></category>
		<category><![CDATA[wearable]]></category>

		<guid isPermaLink="false">http://lakm.us/logit/?p=842</guid>
		<description><![CDATA[The season was intermittently rainy or dry as I began to take interest in weather. After getting stuck with “If-this-than-that” (IFTTT) for multiple location feeds of weather, I found out that I wasn&#8217;t alone, a geek hit the same wall, yet bringing another automation forgery: Nebri OS, an event-driven development platform based-on writing rules in [...]]]></description>
				<content:encoded><![CDATA[<p>The season was intermittently rainy or dry as I began to take interest in weather. After getting stuck with <a href="https://ifttt.com/" title="IFTTT" target="_blank">“If-this-than-that” (IFTTT)</a> for multiple location feeds of weather, I found out that I wasn&#8217;t alone, a geek hit the same wall, yet bringing another automation forgery: <a href="https://nebrios.com/" title="Nebri: Event-driven development platform" target="_blank">Nebri OS</a>, an event-driven development platform based-on writing rules in <a href="https://www.python.org/" title="Python" target="_blank">Python</a>. Without despise, eventually I still use IFTTT on the other end to send weather alert to my smartwatch <a href="../../../2015/01/commuter-train-trouble-alert-delivered-watch-ifttt/" title="Get Commuter Train Trouble Alert Delivered to Watch by IFTTT" target="_blank">again</a>.</p>
<p>A quick adaptation of <a href="https://nebrios.com/blog/weather-alerts-in-multiple-locations" title="Weather Alerts In Multiple Locations" target="_blank">Nebri&#8217;s straightforward blog post</a> is to first shortlist rain related codes into <a href="https://github.com/bandono/nebri/blob/master/tweet_rain/README.md" title="README.md" target="_blank">15 of them</a> and changing from forecast to latest measurement instead. Bridging Nebri and <a href="http://www.cookoo2.com/" title="COOKOO 2" target="_blank">my smartwatch</a> are <a href="https://twitter.com/" title="Twitter" target="_blank">Twitter</a> and <a href="https://ifttt.com/recipes/296352-bogor-jakarta-rain-weather-alert" title="Bogor-Jakarta rain weather alert " target="_blank">IFTTT recipe</a>–the watch merely mirrored my phone, you don&#8217;t need it actually. Why (again) Twitter? Well, rather than the &#8220;then that&#8221; side–the watch enabler, the &#8220;if this&#8221; side of IFTTT for Twitter recipes is quite powerful given so many tweet filtering options.</p>
<p><div class="wp-caption aligncenter" style="width: 460px"><img alt="Nebri OS workflow from YWeather to Twitter" src="../../../../images/nebrios-event-driven-workflow-illustration.png" title="Nebri OS workflow from YWeather to Twitter" width="320" height="262" /><p class="wp-caption-text">Key-value pairs as trigger for event driven Nebri OS workflow</p></div><br />
<span id="more-842"></span><br />
The workflow starts with Drips, a scheduler (<code>cron</code>) where key value-pairs (KVP) is created at certain time. A rule script (<code>yweather</code>) is triggered when this KVP is created. The weather results are sets of later KVPs feeding the <code>twitter</code> rule script where our simple Nebri workflow ends. This is how I get multiple cities, by using different Drips, different events, running the same workflow. Both <code>yweather</code> and <code>twitter</code> scripts are also example of API connectivity to Nebri.</p>
<p>Many things already taken care by Nebri, hence unseasoned programmer should easily cope with writing simple Python rule and focus on the automation, nevertheless complex rule should also be accommodated. I was having trouble on using previous KVP from different PID though–moved them to comment in the script, but they seem to be <a href="https://nebrios.com/blog/releases-2689" title="Releases 2689" target="_blank">working on it</a>. Check their <a href="https://nebrios.com/blog/weather-alerts-in-multiple-locations" title="Weather Alerts In Multiple Locations" target="_blank">YWeather blog post</a> on how the basics work and compare <a href="https://github.com/bandono/nebri/tree/master/tweet_rain" title="Nebri: tweet rain Github" target="_blank">what I did in Github</a>. I embed an example tweet from <a href="https://twitter.com/twithujan" title="@twithujan" target="_blank">@twithujan</a> below. <a href="https://weather.yahoo.com/" title="Yahoo! Weather" target="_blank">Yahoo! Weather</a> frequency of measurement and accuracy are of different topic by the way.</p>
<blockquote class="twitter-tweet" lang="en"><p lang="en" dir="ltr">Bogor is Light Rain with temperature at 23 °C. Taken at Thu, 28 May 2015 7:00 pm WIT</p>
<p>&mdash; Twit Hujan (@twithujan) <a href="https://twitter.com/twithujan/status/603908598314434560">May 28, 2015</a></p></blockquote>
<p><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script></p>
<p>PS: &#8220;<em>hujan</em>&#8221; means &#8220;rain&#8221; in Indonesian</p>
]]></content:encoded>
			<wfw:commentRss>https://lakm.us/logit/2015/06/nebri-automation-weather-feed-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Commuter Train Trouble Alert Delivered to Watch by IFTTT</title>
		<link>https://lakm.us/logit/2015/01/commuter-train-trouble-alert-delivered-watch-ifttt/</link>
		<comments>https://lakm.us/logit/2015/01/commuter-train-trouble-alert-delivered-watch-ifttt/#comments</comments>
		<pubDate>Sat, 17 Jan 2015 14:31:02 +0000</pubDate>
		<dc:creator>Arif</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Web Apps]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[job automation]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[socialmedia]]></category>
		<category><![CDATA[wearable]]></category>
		<category><![CDATA[web-based]]></category>

		<guid isPermaLink="false">http://lakm.us/logit/?p=803</guid>
		<description><![CDATA[Imagine getting alerts of Commuter Line train service disruption right on your wrist! Well, the watch thing isn&#8217;t a must as any SMS-enabled phone will do. But without the watch, I won&#8217;t be introduced to &#8220;If-this-than-that&#8221; (IFTTT), a simple logic line that glues popular apps into trigger and action branded as recipes. Anyone can code [...]]]></description>
				<content:encoded><![CDATA[<p>Imagine getting alerts of Commuter Line train service disruption right on your wrist! Well, the watch thing isn&#8217;t a must as any SMS-enabled phone will do. But without the watch, I won&#8217;t be introduced to <a href="http://techcrunch.com/2014/08/28/ifttt-lands-30-million-series-b-from-norwest-venture-partners-a16z/" title="IFTTT Lands $30 Million Series B From Norwest Venture Partners, A16Z" target="_blank">&#8220;If-this-than-that&#8221;</a> (IFTTT), a simple logic line that glues popular apps into trigger and action branded as <a href="https://ifttt.com/recipes" title="IFTTT - Browse Recipes" target="_blank">recipes</a>. Anyone can code that line, a no-coding logic that cooks: <a href="https://ifttt.com/recipes/184610-natgeo-instagrams-wallpaper" title="IFTTT - NatGeo Instagrams - Wallpaper" target="_blank">sync wallpaper with Nat Geo&#8217; instagram</a>, <a href="https://ifttt.com/recipes/168783-so-mom-doesn-t-call-too-many-times" title="IFTTT - So mom doesn't call too many times" target="_blank">volume goes up when Mom calls</a>, <a href="https://ifttt.com/recipes/165588-change-the-color-of-the-lights-when-the-space-station-flies-over-a-specific-location" title="IFTTT - Change the color of the lights when the Space Station flies over a specific location" target="_blank">change bulb light color after some space station moves</a>, etc. As personal recipe, bring <a href="https://www.kickstarter.com/projects/cuckoo/cookootm-the-watch-for-the-connected-generation" title="KickStarter - cookoo™ - the watch for the connected generation" target="_blank">COOKOO connected watch</a> to the table and I&#8217;ve leveraged public service disruption–no matter how ironic–into edgy personal business.</p>
<div class="wp-caption aligncenter" style="width: 460px"><img alt="" src="../../../../images/ifttt-commuter-line-trouble-notifications.png" title="If this than that recipes alert for Commuter Train trouble" width="450" height="211" /><p class="wp-caption-text">If this than that recipes alert for Commuter Train trouble</p></div>
<p>The ingredient is tweet, <a href="https://twitter.com/search" title="Twitter Search" target="_blank">Twitter Search</a> use case is no longer just sentiment analysis, its function extends to alert, even close to real time–I&#8217;m pretty optimistic given the number of Commuter Line users joining the conversation. Now, the no-code part of our recipe, a <a href="https://twitter.com/search?f=realtime&#038;q=%28to%3Akrlmania%20OR%20%40krlmania%20OR%20from%3ACommuterLine%29%20AND%20%28gangguan%20OR%20pantograf%20OR%20wesel%20OR%20patah%29%20-semoga%20-smoga%20-moga&#038;src=typd" title="Twitter Search - Commuter Line Trouble" target="_blank">Twitter search query</a>, that is</p>
<p><span id="more-803"></span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#40;</span>to:krlmania OR <span style="color: #000000; font-weight: bold;">@</span>krlmania OR from:CommuterLine<span style="color: #7a0874; font-weight: bold;">&#41;</span>
AND <span style="color: #7a0874; font-weight: bold;">&#40;</span>gangguan OR pantograf OR wesel OR patah<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #660033;">-semoga</span> <span style="color: #660033;">-smoga</span> <span style="color: #660033;">-moga</span></pre></div></div>

<p>and a brief explanation is that it queries for some keywords for potential trouble within mentions/replies to <a href="http://twitter.com/krlmania" title="@krlmania" target="_blank">@krlmania</a> and official announcements of <a href="http://twitter.com/CommuterLine" title="@CommuterLine" target="_blank">@CommuterLine</a>. Exclusion added to the search, the sentiment part of tweets, expressing wishes to shoo trouble away–I&#8217;m sorry, but keep praying online anyway.</p>
<p>When Twitter launched Twitter Stories in 2011, I read <a href="https://stories.twitter.com/en/ravi_pina.html" title="RAVI PINA shares train information through crowd sourcing and Twitter" target="_blank">about Ravi Pina</a> running the crowd sourced <a href="http://twitter.com/Caltrain" title="@Caltrain" target="_blank">@Caltrain</a>. Later now I see that official accounts like <a href="https://twitter.com/smrt_singapore" title="@SMRT_singapore" target="_blank">@SMRT_Singapore</a> is also a model of service disruption info center. We can go deeper to better stats from the API web service that shows real time position (<a href="https://play.google.com/store/apps/details?id=com.raia.infokrl&#038;hl=en" title="Google Play - Info KRL" target="_blank">an app is out there</a> showing that the location data API is working), but until its <a href="http://en.wikipedia.org/wiki/Open_data" title="Wikipedia - Open Data" target="_blank">open data</a> status is known, crowd sourcing stays as the most reliable solution, independent to regulation, and easiest to implement. Does the recipe work? During the first week of testing, alerts were flooding–within limit of course–as trouble really happened. So, cook your own ingredients or get my recipes served <a href="https://ifttt.com/p/bandono/shared" title="IFTTT - bandono" target="_blank">here</a>. </p>
<div class="wp-caption aligncenter" style="width: 460px"><iframe class="vine-embed" src="https://vine.co/v/OpU6LTOADvi/embed/simple" width="320" height="320" frameborder="0"></iframe><script async src="//platform.vine.co/static/scripts/embed.js" charset="utf-8"></script><p class="wp-caption-text">Train trouble alert on my watch</p></div>
]]></content:encoded>
			<wfw:commentRss>https://lakm.us/logit/2015/01/commuter-train-trouble-alert-delivered-watch-ifttt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Queue Job To Be Executed At Certain Times</title>
		<link>https://lakm.us/logit/2009/03/queue-job-to-be-executed-at-certain-times/</link>
		<comments>https://lakm.us/logit/2009/03/queue-job-to-be-executed-at-certain-times/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 07:41:38 +0000</pubDate>
		<dc:creator>Arif</dc:creator>
				<category><![CDATA[General Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[job automation]]></category>

		<guid isPermaLink="false">http://localhost/it/?p=62</guid>
		<description><![CDATA[A series of command can be queued by using at command. There are slight variations between UNIXs for at command, the following example is for Ubuntu. Due to to the purpose of running it for OpenView managed nodes (this is some sort of trial-test), I put the job queue as if it was done through [...]]]></description>
				<content:encoded><![CDATA[<p>A series of command can be queued by using <code>at</code> command. There are slight variations between UNIXs for <code>at</code> command, the following example is for Ubuntu.</p>
<p>Due to to the purpose of running it for OpenView managed nodes (this is some sort of trial-test), I put the job queue as if it was done through <code>ovdeploy</code> (remotely).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;cat /etc/hosts &gt; tst.txt&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> tst.at.queue</pre></div></div>

<p>the queued job is a simple <code>cat</code> directed to an output file (<code>tst.txt</code>).</p>
<p>This next <code>at</code> will queue whatever contained in <code>tst.at.queue</code></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ at <span style="color: #660033;">-f</span> tst.at.queue now + <span style="color: #000000;">2</span> minutes
warning: commands will be executed using <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">sh</span>
job <span style="color: #000000;">6</span> at Mon Mar <span style="color: #000000;">30</span> <span style="color: #000000;">22</span>:<span style="color: #000000;">40</span>:00 <span style="color: #000000;">2009</span></pre></div></div>

<p>We can check <code>at </code>queues as:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ atq
<span style="color: #000000;">6</span>       Mon Mar <span style="color: #000000;">30</span> <span style="color: #000000;">22</span>:<span style="color: #000000;">40</span>:00 <span style="color: #000000;">2009</span> a arif</pre></div></div>

<p>It says that the job will be run at a certain time which is at 22:40:00 system time. When the job is done, queue will become empty and <code>tst.txt</code> will be generated as described in job file <code>tst.at.queue</code>.</p>
]]></content:encoded>
			<wfw:commentRss>https://lakm.us/logit/2009/03/queue-job-to-be-executed-at-certain-times/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
