Line breaks are stripped by ckeditor after saving a node programmatically I'm setting a value to a long text using this code : 

$node-&gt;language = $language-&gt;language; // Or e.g. 'en' if locale is enabled
$node-&gt;field_job_description[$field_langcode][0]['value'] = $description;
$node-&gt;field_job_description[$field_langcode][0]['format']  = 'filtered_html';
$node-&gt;field_job_description[$field_langcode][0]['save_value']  = $description;


When viewing the node the line breaks are showing, when I edit this node using ckeditor all link breaks are automatically removed
I would try disabling the Advanced Content Filter in CKEditor as a starting point. 

In a typical scenario, most people are exclusively using CKEditor to set and update their field values, so the content stays exactly the same between viewing and editing the node, which is the behavior you're expecting.

However, since you are setting the field programmatically, when you edit the node it's the first time CKEditor is seeing the field value (i.e. the first time CKEditor filters are being run). CKEditor will filter and "correct" your HTML to its standards, so it's not safe to assume your field value will be untouched if it's the first time CKEditor is seeing it.

Your options are to 1) tweak how CKEditor filters your HTML, or 2) conform the HTML you're programmatically saving to the CKEditor standards.