update and code refactoring focused on: 1. Adding new documentation pages to the table of contents 2. Restructuring the bot templates documentation 3. Changing keyword syntax from underscore format to space format (e.g., `SET_BOT_MEMORY` → `SET BOT MEMORY`) 4. Updating compiler and keyword registration to support the new space-based syntax 5. Adding new keyword modules (social media, lead scoring, templates, etc.) Refactor BASIC keywords to use spaces instead of underscores Change keyword syntax from underscore format (SET_BOT_MEMORY) to more natural space-separated format (SET BOT MEMORY) throughout the codebase. Key changes: - Update Rhai custom syntax registration to use space tokens - Simplify compiler preprocessing (fewer replacements needed) - Update all template .bas files to use new syntax - Expand documentation with consolidated examples and new sections - Add new keyword modules: social_media, lead_scoring, send_template, core_functions, qrcode, sms, procedures, import_export, llm_macros, on_form_submit
60 lines
1.9 KiB
QBasic
60 lines
1.9 KiB
QBasic
' Employee Management Scheduled Jobs
|
|
' Run setup_schedules once to configure all automated jobs
|
|
|
|
PARAM jobname AS STRING DESCRIPTION "Name of the job to execute"
|
|
|
|
IF jobname = "anniversary check" THEN
|
|
SET SCHEDULE "0 8 * * *"
|
|
|
|
let today = FORMAT NOW() AS "MM-DD"
|
|
let message = "Checking for work anniversaries on " + today
|
|
|
|
TALK message
|
|
|
|
' Send anniversary report to HR
|
|
let report = "Daily Anniversary Check completed for " + FORMAT NOW() AS "YYYY-MM-DD"
|
|
SEND MAIL "hr@company.com", "Anniversary Check Report", report
|
|
END IF
|
|
|
|
IF jobname = "probation reminder" THEN
|
|
SET SCHEDULE "0 9 * * 1"
|
|
|
|
let message = "Weekly probation review reminder sent"
|
|
TALK message
|
|
|
|
let report = "Please review employees approaching end of probation period."
|
|
SEND MAIL "hr@company.com", "Probation Review Reminder", report
|
|
END IF
|
|
|
|
IF jobname = "document expiry" THEN
|
|
SET SCHEDULE "0 10 * * *"
|
|
|
|
let message = "Checking for expiring employee documents"
|
|
TALK message
|
|
|
|
let report = "Document expiry check completed. Please review any flagged items."
|
|
SEND MAIL "hr@company.com", "Document Expiry Alert", report
|
|
END IF
|
|
|
|
IF jobname = "daily report" THEN
|
|
SET SCHEDULE "0 18 * * 1-5"
|
|
|
|
let reportdate = FORMAT NOW() AS "YYYY-MM-DD"
|
|
let report = "Daily HR Report for " + reportdate + "\n\n"
|
|
report = report + "Employee activity summary generated.\n"
|
|
report = report + "Please check the HR dashboard for details."
|
|
|
|
SEND MAIL "hr@company.com", "Daily HR Report - " + reportdate, report
|
|
|
|
TALK "Daily HR report sent"
|
|
END IF
|
|
|
|
IF jobname = "setup schedules" THEN
|
|
TALK "Setting up HR scheduled jobs..."
|
|
TALK "• Anniversary Check: Daily at 8:00 AM"
|
|
TALK "• Probation Reminder: Weekly on Monday at 9:00 AM"
|
|
TALK "• Document Expiry: Daily at 10:00 AM"
|
|
TALK "• Daily Report: Weekdays at 6:00 PM"
|
|
TALK ""
|
|
TALK "✅ All schedules configured successfully!"
|
|
END IF
|