# Octoprint GCODE script for job cancellation sidekick 747

**URL:** <https://forum.lulzbot.com/t/octoprint-gcode-script-for-job-cancellation-sidekick-747/24186>\
**Category:** Software\
**Created:** [February 6, 2022, 10:28pm UTC](https://forum.lulzbot.com/t/octoprint-gcode-script-for-job-cancellation-sidekick-747/24186 "2022-02-06T22:28:50Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![bd2022](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@bd2022](https://forum.lulzbot.com/u/bd2022)\
**Post date:** [February 9, 2022, 3:03am UTC](https://forum.lulzbot.com/t/octoprint-gcode-script-for-job-cancellation-sidekick-747/24186/8 "2022-02-09T03:03:13Z")

</div>

Okay, I found this code (which I have not tested):

```auto
G91; Set to Relative position
G1 E-6 F300; retract the filament a bit before lifting the nozzle
G0 Z50; move z axis up 50
G1 Y150 F5000; move part out for inspection

```

from this post dated about 4 years ago [Octoprint Filament Runout Sensor - #16 by eobie](https://forum.lulzbot.com/t/octoprint-filament-runout-sensor/5190/16)

I’m not sure why the mix of G0 and G1 commands after reading this: [Linear Move | Marlin Firmware](https://marlinfw.org/docs/gcode/G000-G001.html)

Which says “Keep using `G0` for non-print moves. It makes G-code more adaptable to lasers, engravers, etc.” maybe it is a don’t care in the context of octoprint?

---

_[View the full topic](https://forum.lulzbot.com/t/octoprint-gcode-script-for-job-cancellation-sidekick-747/24186)._
