Latest Register Log In

+ Advanced Search

Automating Tasks

Automating Tasks
09/25/03 (Edited 01/30/14)

Note: This is an advanced topic for programmers.

At Admin Panel -> Miscellaneous -> Crons, you have an option to run a script every x hours. This allows you to run PHP cron jobs within WSN. Do not alter the three preexisting crons, they're necessary to WSN's operation.

Any cron script you add will be included into the middle of WSN and so will have access to all values set in start.php -- $thismember, $settings, and of course the ability to use the WSN classes. There are various custom tasks you might wish to perform at intervals, the ideas are up to you. This option is clearly intended for those who can do PHP coding on their own, so everyone else should ignore it.

Note that these tasks are not true cron jobs in the operating system, they must be executed as an actual visitor visits a page. If there's no traffic on the site, it won't run. Do not run anything which will take longer than a few seconds, because there will be a user waiting for their page to load. A semi-intensive task is better done here where it only affects on person every x hours than if it were done on every page load, to be sure, but if you have a truly intensive task you should run it as a true cron job using your web host's facilities if they offer this feature to you.

Description Running a simulated cron job and reseting values.
Views 1766 views. Averaging 0 views per day.