/swish/lib/cron.pl
All Application Manual Name SummaryHelp

  • swish
    • lib
      • messages.pl
      • paths.pl -- Setup SWISH search paths
      • config.pl -- Make HTTP locations known to JSON code
      • page.pl -- Provide the SWISH application as Prolog HTML component
      • help.pl -- SWISH help system
      • search.pl -- SWISH search from the navigation bar
      • chat.pl -- The SWISH collaboration backbone
      • storage.pl -- Store files on behalve of web clients
      • gitty.pl -- Single-file GIT like version system
      • gitty_driver_bdb.pl -- Gitty BDB driver
      • gitty_driver_files.pl -- Gitty plain files driver
      • swish_redis.pl -- Redis stream connection
      • patch.pl -- Run patch program
      • authenticate.pl -- Authentication access for SWISH
      • pep.pl -- SWISH PEP (Policy Enforcement Point)
      • avatar.pl -- Avatar management
      • noble_avatar.pl -- Noble Avatar generator
      • chatstore.pl -- Store chat messages
      • content_filter.pl -- Ban list content filter
      • include.pl -- Support :- include(File) from SWISH
      • swish_csv.pl -- Support CSV output from a Pengines server
      • examples.pl -- Serve example files
      • md_eval.pl -- Provide evaluable markdown
      • profiles.pl
      • highlight.pl -- Highlight token server
      • markdown.pl -- SWISH Notebook markdown support
      • template_hint.pl -- Generate template hints for CondeMirror
      • render.pl -- SWISH term-rendering support
      • web.pl -- Serve /plugin
      • version.pl -- Manage software versions
      • oauth2.pl -- Oauth2 based login
      • swish_debug.pl -- Print debug messages and test assertions
      • data_source.pl -- Cached data access
      • logging.pl -- Add SWISH query execution to the HTTP log file
      • bootstrap.pl -- Bootstrap form generator
      • form.pl -- Form handling utilities
      • r_swish.pl
      • download.pl -- Provide a button for downloading data
      • cron.pl -- Schedule HTTP server maintenance tasks
        • http_schedule_maintenance/2
      • http_version.pl -- Serve version details over HTTP
      • session.pl -- Setup SWISH sessions
      • trace.pl --
      • projection.pl -- Define the projection
      • attvar.pl
      • jquery.pl -- Call jQuery on the SWISH interface
      • dashboard.pl -- Provide non-programmer query execution
      • html_output.pl -- SWISH HTML Output
      • swish_diagnostics.pl
      • procps.pl -- Get process statistics from Linux /proc
      • flags.pl
      • swish_chr.pl -- Make CHR available in SWISH
 http_schedule_maintenance(+When, :Goal) is det
Schedule running Goal based on maintenance broadcasts. When is one of:
daily(Hour:Min)
Run each day at Hour:Min. Min is rounded to a multitude of 5.
weekly(Day, Hour:Min)
Run at the given Day and Time each week. Day is either a number 1..7 (1 is Monday) or a weekday name or abbreviation.
monthly(DayOfTheMonth, Hour:Min)
Run each month at the given Day (1..31). Note that not all months have all days.
clear
Clear the schedule for the given goal.

This must be used with a timer that broadcasts a maintenance(_,_) message (see broadcast/1). Such a timer is part of library(http/http_unix_daemon).

Arguments:
Goal- is the goal called. This is executed in the thread that broadcasts the maintenance(_,_) event, i.e., by default in the main thread. If a considerable amount of work is to be done it is adviced to start a detached thread to do the real work.