{"action":"created","issue":{"url":"https://api.github.com/repos/ow2-proactive/scheduling/issues/2279","labels_url":"https://api.github.com/repos/ow2-proactive/scheduling/issues/2279/labels{/name}","comments_url":"https://api.github.com/repos/ow2-proactive/scheduling/issues/2279/comments","events_url":"https://api.github.com/repos/ow2-proactive/scheduling/issues/2279/events","html_url":"https://github.com/ow2-proactive/scheduling/issues/2279","id":98145131,"number":2279,"title":"CRON loops are not usable","user":{"login":"lpellegr","id":128898,"avatar_url":"https://avatars.githubusercontent.com/u/128898?v=3","gravatar_id":"","url":"https://api.github.com/users/lpellegr","html_url":"https://github.com/lpellegr","followers_url":"https://api.github.com/users/lpellegr/followers","following_url":"https://api.github.com/users/lpellegr/following{/other_user}","gists_url":"https://api.github.com/users/lpellegr/gists{/gist_id}","starred_url":"https://api.github.com/users/lpellegr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lpellegr/subscriptions","organizations_url":"https://api.github.com/users/lpellegr/orgs","repos_url":"https://api.github.com/users/lpellegr/repos","events_url":"https://api.github.com/users/lpellegr/events{/privacy}","received_events_url":"https://api.github.com/users/lpellegr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ow2-proactive/scheduling/labels/priority:major","name":"priority:major","color":"ff9999"},{"url":"https://api.github.com/repos/ow2-proactive/scheduling/labels/type:improvement","name":"type:improvement","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/ow2-proactive/scheduling/milestones/30","html_url":"https://github.com/ow2-proactive/scheduling/milestones/7.0.0","labels_url":"https://api.github.com/repos/ow2-proactive/scheduling/milestones/30/labels","id":1162406,"number":30,"title":"7.0.0","description":"Next release","creator":{"login":"activeeon-bot","id":12379036,"avatar_url":"https://avatars.githubusercontent.com/u/12379036?v=3","gravatar_id":"","url":"https://api.github.com/users/activeeon-bot","html_url":"https://github.com/activeeon-bot","followers_url":"https://api.github.com/users/activeeon-bot/followers","following_url":"https://api.github.com/users/activeeon-bot/following{/other_user}","gists_url":"https://api.github.com/users/activeeon-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/activeeon-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/activeeon-bot/subscriptions","organizations_url":"https://api.github.com/users/activeeon-bot/orgs","repos_url":"https://api.github.com/users/activeeon-bot/repos","events_url":"https://api.github.com/users/activeeon-bot/events{/privacy}","received_events_url":"https://api.github.com/users/activeeon-bot/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":113,"state":"open","created_at":"2015-06-12T16:58:48Z","updated_at":"2015-10-19T07:42:03Z","due_on":"2015-10-08T22:00:00Z","closed_at":null},"comments":2,"created_at":"2015-07-30T11:31:22Z","updated_at":"2015-10-28T13:48:06Z","closed_at":null,"body":"CRON loops are really useful to execute recurring actions. Unfortunately, some issues are encountered when the number of tasks generated by a CRON loop for a given job becomes too high. Indeed, the scheduler was not designed for handling a lot of tasks per Job. \r\n\r\nThis point should be improved since CRON loops have been used or requested for several use cases (Homeoffice, Enterome, etc.). \r\n\r\nThe first solution is to add support for a big number of tasks per job in the scheduler (related to #1982). It implies to support pagination for tasks in the REST API but also in the scheduler web portal.\r\n\r\nAnother solution that could be investigated is to see a CRON loop as a set of tasks whose each iteration triggers the execution of the tasks in a dedicated job. The new job that is related to the previous iteration could simply keep the relation to the previous job by adding the information in its name. However, a more robust and reusable solution would be to keep track of  the job ID associated to the previous iteration but also the ID of the original Job (the one that triggered the first iteration) at the DB level."},"comment":{"url":"https://api.github.com/repos/ow2-proactive/scheduling/issues/comments/151849245","html_url":"https://github.com/ow2-proactive/scheduling/issues/2279#issuecomment-151849245","issue_url":"https://api.github.com/repos/ow2-proactive/scheduling/issues/2279","id":151849245,"user":{"login":"lpellegr","id":128898,"avatar_url":"https://avatars.githubusercontent.com/u/128898?v=3","gravatar_id":"","url":"https://api.github.com/users/lpellegr","html_url":"https://github.com/lpellegr","followers_url":"https://api.github.com/users/lpellegr/followers","following_url":"https://api.github.com/users/lpellegr/following{/other_user}","gists_url":"https://api.github.com/users/lpellegr/gists{/gist_id}","starred_url":"https://api.github.com/users/lpellegr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lpellegr/subscriptions","organizations_url":"https://api.github.com/users/lpellegr/orgs","repos_url":"https://api.github.com/users/lpellegr/repos","events_url":"https://api.github.com/users/lpellegr/events{/privacy}","received_events_url":"https://api.github.com/users/lpellegr/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T13:48:06Z","updated_at":"2015-10-28T13:48:06Z","body":"I am not sure it is fixed yet, but this is only my opinion. Pagination is available for tasks from clients but internally (scheduler side) all tasks are still fetched in memory whatever the number of tasks contained by a job?\r\n\r\nI think there is still some remaining tasks as pointed by the [story on Trello](https://trello.com/c/FtSVVzIy). Maybe a new story could be created to address these points."}}