How do I run a cron job manually?
Answer
I present a solution based on Pistos answer, but without the flaws.
Answer
I present a solution based on Pistos answer, but without the flaws.
- Add the following line to the crontab, e.g. using crontab -e * * * * * /usr/bin/env > /home/username/cron-env.
- Create a shell script which executes a command in the same environment as cron jobs run: #!/bin/sh . ” $1″ exec /usr/bin/env -i “$SHELL” -c “.