Running php file as cron job in Windows 8.1 using php.exe

We are trying to configure the php file as a cron job in Windows 8.1, call GCM sending notification and receive notification in our registration devices.

It works fine when we run cron using any browser like Chrome, Firefox, then I get a GCM notification on my registered device, but if we try the same setting using php.exe, we won’t get a notification about our devices.

To schedule a cron, we use the task scheduler in the sense that our trigger settings are: enter image description here On the "Action" tab, we created the following lines: -

Program / script: - D: \ xampp \ php \ php.exe

(): -f D:\xampp\htdocs\PushNotificationSql\tasknotification.php

(): - D:\xampp\htdocs\PushNotificationSql enter image description here

, , , . enter image description here

!

+4
1

, .

1). ActionTab

/script: - D:\xampp\php\php.exe

(): -c D:\xampp\php\php.ini -f D:\xampp\htdocs\PushNotificationSql\tasknotification.php

(): - [ ]

php script cmd, php.exe

2). php script , php- javascript, , script cmd , , .

3). php cron php [tasknotification.php], .

+2

Source: https://habr.com/ru/post/1605899/


All Articles