Snaplet-Tasks / dist / doc / html / snaplet-tasks / Snap-Snaplet-Tasks.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Snap.Snaplet.Tasks</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Snap-Snaplet-Tasks.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">snaplet-tasks-0.1.1: Snaplet for Snap Framework enabling developers to administrative tasks akin to Rake tasks from Ruby On Rails framework.</p></div><div id="content"><div id="module-header"><p class="caption">Snap.Snaplet.Tasks</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This module contains definition of a Tasks Snaplet for 
   Snap &gt;= 0.7.*. It allows Snap app developers to create command 
   line tasks akin to <a href="rake tasks.html">rake tasks</a> found in Ruby On Rails framework.
</p><p>Essenstially, this snaplet let's your other snaplet's to have 
   their administrative tasks that You'd call from command line 
   to - let's say create indexes in Your DB or screen scrape some 
   useful data from some service and save it in DB.
</p><p>Every task is in fact just a handler for route. Those routes 
   are hashes for routes so that 'somens:other:cool:task' becomes
   a valid route in app.
   To create such task in one of Your snaplets (maybe in your app
   snaplet) - define route for it using handy <code><a href="Snap-Snaplet-Tasks-Utils.html#v:task">task</a></code> function
   that this module reexports.
</p><p>Running tasks is fairly simple: 
   yourapp T snaplet:super:cool arg1=v1 arg2=v2 [-p 1000]
   This means that your task command always follows <code>T</code>
   If you're running Your app at default port You can specify
   different port at the end by using standard -p argument.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:tasksInit">tasksInit</a> ::  SnapletInit b <a href="Snap-Snaplet-Tasks.html#t:TasksSnaplet">TasksSnaplet</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:TasksSnaplet">TasksSnaplet</a> </li><li class="src short">module <a href="Snap-Snaplet-Tasks-Utils.html">Snap.Snaplet.Tasks.Utils</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:tasksInit" class="def">tasksInit</a> ::  SnapletInit b <a href="Snap-Snaplet-Tasks.html#t:TasksSnaplet">TasksSnaplet</a></p><div class="doc"><p>This method spawns a new thread that waits till
   server is ready and then fires given task.
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:TasksSnaplet" class="def">TasksSnaplet</a>  </p></div><div class="top"><p class="src">module <a href="Snap-Snaplet-Tasks-Utils.html">Snap.Snaplet.Tasks.Utils</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.