Crontab run
From PlainOldWebserver
pow_server.crontab_run(intervals, command)
Schedules a cron job to be run at set intervals. The variable intervals is set according to the Unix cron job with a few modifications. An example of a cron job that runs every hour at the top of the hour is "0 * * * *". The order is minute, hour, day of month, month, day of week. The acceptable intervals are limited. You may use a number or "*", but no commas, dashes or slashes. The cron jobs are canceled every time the browser exits. Place your crontab_run command in the "/pow/system/startup.sjs" file to run it every time the server restarts. The following runs Sunday once per hour.
pow_server.crontab_run("0 * * * 0", "alert('Sunday top of the hour')");
This executes an SJS file at 5 pm every day.
pow_server.crontab_run("0 17 * * *", "pow_include('/pow/htdocs/go_home.sjs')");
See Also
- pow_server.crontab_set_state()
- pow_server.crontab_run()
