scheduling with cronjob to run the php file for only one time

1.4k Views Asked by At

how to run the php file only for once using the cron jobs. i.e., to schedule task to work on 20/06/2015 10:30:00

I tried something like this :

30 10 20 6 ? 2015 /usr/bin/php /path/to/my/file/application.php

but it is not working.

I just want to schedule it for future but do not want to repeat it. How to do it ?

Thank you for any help

1

There are 1 best solutions below

6
On
 *     *     *   *    *        Your application file or command 
 -     -     -   -    -
 |     |     |   |    |
 |     |     |   |    +----- day of week (0 - 6) (Sunday=0)
 |     |     |   +------- month in numbers (1 - 12)
 |     |     +--------- day of month (1 - 31)
 |     +----------- hour (0 - 23)
 +------------- min (0 - 59)

21 12 13 6 0 /usr/bin/php /var/www/html/run.php

this works for me every time