Skip to content

Instantly share code, notes, and snippets.

<html>
<head>
<title>Backbone JS</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.js" type="text/javascript"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore.js" type="text/javascript"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.0/backbone.js" type="text/javascript"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mustache.js/0.7.2/mustache.js" type="text/javascript"></script>
<script type="text/javascript">
@stanmx
stanmx / example.rb
Last active December 27, 2015 10:19
whenever gem implementation
Following the instructions from @lol007 http://stackoverflow.com/a/18864911/556548 i make the next example:
I haved a CRUD with info called Post with title:string, content:text and status:boolean with Ruby 1.8.7 and Rails 3.2.11 in development environment.
I'm add whenever gem to my gemfile and run the bundle install command. Then i run the command whenever . in the console.
This generate the config/schedule.rb when i add the next code:
# schedule.rb
every 5.minutes do