- Ruby Version Manager - rvm
- Git
- MySQL
- rvm
- ruby 2.1.5p273 (install by using rvm)
- gem install rails (version 3.2.13)
$ rake db:create:all
$ rake db:schema:load
or
$ rake db:migrate
$ rvm --create use 2.1.5@schedular
$ gem install bundler
$ gem install rails (version 3.2.13)
$ cd [path_to]/task_schedular
$ bundle install
$ rake db:create:all
$ rake db:schema:load
or
$ rake db:migrate
$ rails server
or
$ rails s
$ rake jobs:work
http://localhost:3000/
Import API END POINTS using POSTMAN through
OR
- the file "TaskSchedular.json.postman_collection" (find this file in current folder)
Or can use other method to hit API calls with following credentials:
- Authorization: 195b4a5bb185ef3f43dc5288b79386be
- GET: To get all tasks: http://localhost:3001/api/v1/schedular/tasks
- POST: To schedule task: http://localhost:3000/api/v1/schedular/schedule_task
- GET: To get all task by ID : http://localhost:3000/api/v1/schedular/task?id=<:id>
- Following Form Data
name: Task Name
path: Task Path
run_at: Time in valid ruby formate*
1) 2015-08-19 19:35:46 +0500
2) Wed, 19 Aug 2015 14:40:57 UTC +00:00
3) Wed, 19 Aug 2015 14:40:57
4) Wed, 19 Aug 2015
5) 2015-08-19
6) 2015-08-19 19:35:46