How do I run a cron job manually?

Ẽm Thư

New member
How do I run a cron job manually?
Answer
I present a solution based on Pistos answer, but without the flaws.
  1. Add the following line to the crontab, e.g. using crontab -e * * * * * /usr/bin/env > /home/username/cron-env.
  2. 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 “.
 

Tìm kiếm

Back
Top