Run this command to edit your cronjobs پرینت

  • 0

Run this command to edit your cronjobs:

crontab -e

And a crontab file can look like this:

# min    hour   day   month   dayofweek   command
15      *       *       *       *       /home/jarmund/crons/somescript.php

If you need to run more than one command, just add a new line in the similar format below. * means "all" as usual, in other words, the entry above runs /home/jarmund/crons/somescript.php "15 minutes past, all hours, all days, all months, all weekdays". To store it, just save and exit to the temporary filename that was suggested. NB: The example above assumes that the php script you want to run has the path to its interpreter set in it. If not, you need to include that in the command, such as with:

/usr/bin/php /home/jarmund/crons/somescript.php

crontab -e takes you to whichever editor is set in your shell. If you don't want to use your default one for whatever reason, just:

export EDITOR=nano

...for example, beforehand. Assuming you use bash, that is.


آیا این پاسخ به شما کمک کرد؟

« برگشت