After a day of work I managed to do it but still don't know if I am doing it correctly but it works.
I created the scheduler object and when I got to resources I did an Ajax quest just for it and the init();
$.ajax({
type: "POST",
url: chartDataUrl,
dataType: 'JSON',
success:function(data)
{
v.resources = data;
v.init();
}
});