1

I am trying to create a CRON JOB or Schedule Task(for Windows).

I searched over net and found several tutorials, But ended up with lot of confusion.

Some try to explain using a Cpanel, some use a Task Scheduler. As a developer what if i don't have direct access to Cpanel or SSH. Is there any method which programmatically executes the cron command.

I just want to know In-order to execute my php script(Script which delivers push messages) using a CRON, Where should i give the command

* * * * * /usr/php/php.exe /root/push.php

Also i found some uses vi editor, Actually its for UNIX.

I want to test the cron job initially on my localhost (XAMPP, windows machine), Later on my company's server(Windows) and finally on Clients Server(usually a LINUX based).

Ramaraju.d
  • 1,301
  • 6
  • 26
  • 46
  • Is there any reason you can't test the script manually before deploying it to a Linux server? If you're in a Windows environment, just create a Scheduled task that runs the PHP file. And, it does not make any sense to use a ".exe" file in a crontab entry -- which is Linux. – DavidS Mar 12 '13 at 15:20
  • do you have ssh access to the server? – Amir Mar 12 '13 at 15:39
  • @DavidS Yeah i tested my script manually and the notifications are sent. This is how i tested. I just called my php script in the browser. But this is not i need! Instead the script should be called upon itself with out users action. – Ramaraju.d Mar 15 '13 at 05:05
  • @Amir No i dint have the access – Ramaraju.d Mar 15 '13 at 05:06

1 Answers1

0

If you want to use a scheduled task in windows you must go trough the control panel. No other option. When you want to create a cronjob. (only unix based) use:

sudo crontab -e

and paste this command in there.

* * * * * /path/to/php /path/to/push.php

This job wil run every minute.

Eernie
  • 470
  • 3
  • 15