cron jobs
Posted by: techker (---.dsl.bell.ca)
Date: April 03, 2008 03:03PM

hey guys love the app better than easy php!lol

i was woundering if i can put a cron job application on it?or is it already in there?

Options: ReplyQuote
Re: cron jobs
Posted by: toivo (203.19.130.---)
Date: April 04, 2008 02:36PM

Hi,

cron is the daemon or service from the unix/linux environment, and wamp does not understand /etc/crontab. However, it is possible to schedule CLI scripts to run once a week or every 15 minutes - which is what cron does - by using the Windows scheduler service.

Here is how you can run a scheduled script:

In the scripts folder, create a file 'scheduler.cmd' with the contents:

php db_check.php

The script db_check.php in the same folder can do things like check the database integrity using mysqlcheck, repair damaged tables and send an email to the webmaster.

Go to Control Panel - Administrative Tools - Computer Management - Local Users and Groups - Local Users and create a user with enough access rights to run the scheduled scripts. Select the options 'User cannot change the password' and 'Password never expires'. Enter an explanation like 'Scheduler user - do not delete', to make sure the scheduled jobs do not stop unexpectedly.

In Windows Scheduler, add a scheduled task which runs the script 'scheduler.cmd' from your scripts folder using the username and password of the scheduler user you have just created.

Regards,

toivo
Sydney, Australia

Options: ReplyQuote
Re: cron jobs
Posted by: techker (---.dsl.bell.ca)
Date: April 04, 2008 02:46PM

hmm ggod thing the only thing is im realizing that is not what i need..

see i need to make a form for my client that will enter all info in a databse.now it needs to be access anywere with or without internet.

so thats were i that putting wamp on his laptop and use it as a server to similate the web.now what i need to do is make a script or something to update his web server when he connects his laptop to internet.take all the new info stored off line and dump it in the web server.is this possible?

Options: ReplyQuote
Re: cron jobs
Posted by: toivo (203.19.130.---)
Date: April 04, 2008 03:46PM

So you want to synchronize two databases? Anything is possible, of course.

Replication of the database might be your best option: [dev.mysql.com]. Especially the bit with "Long-distance data distribution - if a branch office would like to work with a copy of your main data, you can use replication to create a local copy of the data for their use without requiring permanent access to the master."

Regards,

toivo
Sydney, Australia



Edited 1 time(s). Last edit at 04/04/2008 03:48PM by toivo.

Options: ReplyQuote


Sorry, only registered users may post in this forum.