Every one...
I would like some help with the pop3 fetching.
I have succesfully installed HESK on a WAMP-server (windows based). The challenge now is to get a 'cronjob' running every 5 minutes to execute the script. However, windows does not have CRONTAB, that is a LINUX feature. So we need to use the task scheduler.
How to go about getting the pop3 fetching script to run automatically?
Any feedback is greatly appreciated!
Chris!
POP3 fetching- Cronjob - WAMP-server
Moderator: mkoch227
Re: POP3 fetching- Cronjob - WAMP-server
Yes, on Windows Task scheduler must be used.
You will also need a simple program that can fetch web pages, for example wget.
Here is how I would do it (this is on Windows 7, other Windows version should have it similar):
0. Before anything else, make sure the pop3_fetch.php script works fine if you open it in the browser:
1. Download and install wget for windows, for example to "C:\wget":
2. In Windows open Task scheduler
3. Click "Create Task..."
4. Give the task a name, for example "HESK POP3 fetch"
5. On the "Triggers" tab click "New..."
The "Begin the task" should be set "On a schedule" and "Daily" selected.
Under Advanced settings check "Repeat task every 5 minutes (or 10 minutes)" and Duration "Indefinitely".
Other options (like stop the task or expire) shouldn't be selected.
6. On "Actions" tab click "New..."
Action should be "Start a program"
Program should be wget.exe, for example "C:\wget\bin\wget.exe"
Arguments should be:
(change the URL to your local hesk_pop3.php URL of course)
7. On "Conditions" tab uncheck the option "Start the task only if the computer is on AC power"
8. On "Settings" tab uncheck the setting "Stop the task if it runs longer than" so that this task should run indefinitely.
That should do the trick.
You will also need a simple program that can fetch web pages, for example wget.
Here is how I would do it (this is on Windows 7, other Windows version should have it similar):
0. Before anything else, make sure the pop3_fetch.php script works fine if you open it in the browser:
Code: Select all
http://localhost/hesk/inc/mail/hesk_pop3.php
2. In Windows open Task scheduler
3. Click "Create Task..."
4. Give the task a name, for example "HESK POP3 fetch"
5. On the "Triggers" tab click "New..."
The "Begin the task" should be set "On a schedule" and "Daily" selected.
Under Advanced settings check "Repeat task every 5 minutes (or 10 minutes)" and Duration "Indefinitely".
Other options (like stop the task or expire) shouldn't be selected.
6. On "Actions" tab click "New..."
Action should be "Start a program"
Program should be wget.exe, for example "C:\wget\bin\wget.exe"
Arguments should be:
Code: Select all
-q -O nul http://localhost/hesk/inc/mail/hesk_pop3.php
7. On "Conditions" tab uncheck the option "Start the task only if the computer is on AC power"
8. On "Settings" tab uncheck the setting "Stop the task if it runs longer than" so that this task should run indefinitely.
That should do the trick.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools