Yes, but you should really use a database table to record pending future work instead. Then, if you server is down when it was supposed to run the work it will start up, see the work, use a transaction to atomically mark the work as started, and when completed atomically mark the work as done and insert a new row for the next run.