Forum Moderators: coopster

Message Too Old, No Replies

How to automatic execute job for query?

         

toplisek

1:05 pm on Jun 24, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have query like:
SELECT userid, usernamejoindate, lastactivity
FROM user
AND joindate <1298937600
AND lastactivity - joindate < 181440

How to execute each 30 days?

penders

11:33 am on Jun 25, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If you need to automatically execute this job/script every 30 days then you could set up a CRON job on your server that will run every 30 days.

(Although I suspect you are asking another question?!)

toplisek

6:40 pm on Jun 26, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Should be CRON job inside PHP file with access to database or it can be just query.

coopster

5:25 pm on Jul 5, 2011 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You can run any command you want, including a call to a PHP script or a mysql command line query. You can also code multiple commands into a shell script and run that ... all kinds of options.