I scrape it either when I run out (and need to smoke the resin cuz its all I got left) or when it gets clogged or just reduced airflow through the pipe due to resin.

Its always nice to keep a small supply of resin handy. If you are running low on weed, sprinkle some resin crumbs on top of your last few bowls and they will last 3x as long. Fucks with the taste of the weed though.