0
votes

I want to set cron job for one of my project and it works on my domain with sub folder named VMS.

I have created the cron job with controller:

    file:  main.php
   Class:  Main
  Method:  ExpiryAlertMail
Location: public_html/vms/application/controllers/main.php

I will try below listed method to run cron job but it give me different-2 error message with different-2 cases. So, how can I run my cron job once in a day?

/usr/local/php4/bin/php /home//public_html/vms/index.php main ExpiryAlertMail

/usr/bin/php -q /home//public_html/vms/index.php main ExpiryAlertMail >> /dev/null

/usr/bin/php /home//public_html/vms/index.php main ExpiryAlertMail

/usr/bin/php /home//public_html/vms/index.php

0 13 * * * php home//public_html/vms/index.php main/ExpiryAlertMail

php /home//public_html/vms/cron.php /main/ExpiryAlertMail

~/public_html/vms/index.php main ExpiryAlertMail

wget http://www.domain.com/vms/main/ExpiryAlertMail

php -q /home//public_html/vms/index.php?c=main&m=ExpiryAlertMail

/usr/bin/php-cli /home//public_html/vms/index.php main ExpiryAlertMail php /home//public_html/vms/cron.php main/ExpiryAlertMail

wget -O - -q -t 1 http://www.domain.com/vms/cron/run

1
What are the error messages you get? - Abrixas2
Case :php /home/user name/public_html/vms/cron.php /main/ExpiryAlertMail msg: You dont have access to this page, Please contact Admin! Case :php home/username/public_html/vms/index.php main/ExpiryAlertMail msg: You dont have access to this page, Please contact Admin! - user3567380
Case: wget domain.com/vms/main/ExpiryAlertMail Msg: HTTP request sent, awaiting response... 406 Not Acceptable 10:35:01 ERROR 406: Not Acceptable. - user3567380
Case: curl '[domain.com/vms/main/ExpiryAlertMail]'; Msg: curl: (3) [globbing] illegal pattern or range specification after pos 2 - user3567380
The first two messages point out some problem with your server configuration or the application. Can you open the URLs with your browser without additional restrictions (like javascript or cookies)? The third message indicates that the server cannot return the requested data in a way you specified as acceptable (using Accept headers, eg. Accept: application/x-shockwave-flash). - Abrixas2

1 Answers

0
votes

If your script can be requested by url, you may try

0 13 * * * curl '[your script url]'