Baseline Task Scheduling in Ruby

Aspose.Tasks - Baseline Task Scheduling

To get Baseline Task Scheduling using Aspose.Tasks Java for Ruby, simply invoke TaskBaselineSchedule module. Here you can see example code.

Ruby Code

oneSecond = 10000000
oneMinute = 60 * oneSecond
oneHour = 60 * oneMinute
project = Rjb::import('com.aspose.tasks.Project').new
task = project.getRootTask().getChildren().add("Task")
project.setBaseline(Rjb::import('com.aspose.tasks.BaselineType').Baseline)
baseline = task.getBaselines().toList().get(0)
duration = baseline.getDuration().toDouble()
baseline_duration = duration / oneHour
puts baseline_duration
puts "Baseline Start: "  + baseline.getStart().to_string
puts "Baseline Finish: " + baseline.getFinish().to_string

Download Running Code

Download Baseline Task Scheduling (Aspose.Tasks) from any of the below mentioned social coding sites: