dynamic dynamic - 5 months ago 11
Linux Question

how to test cron job?

I have a

#!/bin/bash
file in cron.week directory.

Is there a way to test if it works? Can't wait 1 week

I am on debian 6 with root

Answer

Just do what cron does:

run-parts -v /etc/cron.weekly

or

run-parts /etc/cron.weekly -v

if you receive the "Not a directory: -v" error.

-v prints the script names before they are run.