You need get all category ids from product, then remove Sales category ID from category ids array and set them back to product.
Example, Sales category ID is 5.
foreach ($collection as $product) {
//Getting all category ids
$ids = $product->getCategoryIds();
//Searching array key with value 5 and removing from array
if (($key = array_search(5, $ids)) !== false) {
unset($ids[$key]);
$product->setCategoryIds($ids)
$product->save();
}
}
P.S. You can use magento cron job functionality, than you do not need to use:
require_once 'app/Mage.php';
Mage::app();