CoreInto

Automation

CoreInto's recurring work (renewal invoices, reminders, late fees, suspensions, domain syncing, ticket rules, email sending, backups) is done by automation tasks that cron.php runs from a cron job on your hosting account.

CoreInto administrator guide: Automation overview with the main sections of the article

CoreInto's recurring work (renewal invoices, reminders, late fees, suspensions, domain syncing, ticket rules, email sending, backups) is done by automation tasks that cron.php runs from a cron job on your hosting account. This chapter explains how the runs work, the Automation Status page, every task with how often it runs and what it does, and the settings that steer the daily run.

How automation runs

The cron job. A cron job on the hosting account runs cron.php every 5 minutes:

*/5 * * * * php -q /home/USER/public_html/cron.php

Where the host only offers web cron jobs, the address https://billing.example.com/cron.php?key=CRONKEY does the same; the key is shown on Utilities > Automation Status. A request without the right key answers "Forbidden". Setting up the cron job is covered in Getting started.

The task table. Every task is a row in the tasks table with a name, whether it is enabled, how often it runs (in minutes), its last run and result, when it is next due, and a lock. Each run of cron.php:

  1. Stops at once if new CoreInto files were uploaded and the database update has not been applied yet (with -v on the command line it prints "waiting: a database update is pending").
  2. Goes through the enabled tasks in order and runs each one whose next due time has passed, or that has never run.
  3. Before running a task, claims it in the database. Two runs that overlap never do the same task twice; a claim older than 2 hours is treated as abandoned and taken over.
  4. Records each run: when it started, how many seconds it took, whether it succeeded, and a one-line result such as "3 invoices created" or "error: ...". The runs are listed on Automation Status and kept for 90 days.
  5. Works out when the task is next due and records the time of this cron run (shown as "Last run" on Automation Status and on the dashboard's Automation Overview widget).

A task that throws an error is marked Failed with the error message; the other tasks still run.

When each task is due. The frequency decides the schedule:

FrequencyWhen it runs
Every minute, every 5 minutes, every 4 hours, hourly (less than a day)That many minutes after its last run, so on the next cron run after that.
DailyOnce a day at the "Hour of the daily run" (Settings > Automation Settings, Schedule tab, default 9) in the company's time zone. After a run, the next is at that hour the following day.
MonthlyOn the first day of the next month at the daily hour.

A task that has never run (for example right after installation, or a task added by an update) runs on the next cron run whatever the hour, and from then on keeps its schedule. Running a task by hand also moves its next due time forward from the moment it ran.

The daily tasks are listed in a fixed order (the sort column): exchange rates first, then invoices, late fees, card charges, reminders, auto-cancel, domain notices, cancellations, suspensions, terminations, and so on. They run one after another within the same cron run.

Email. Emails are not sent by the task that writes them. Every email is queued as a job and sent by the jobs task (every minute) or at the end of the request that queued it. A send that fails is tried again after 2, 8, 18, 32 and 50 minutes, then marked failed in the Email Message Log.

Utilities > Automation Status

Needs the permission "Automation status". The page has four parts.

The cron job. Whether the automation has run at all, when it last ran, and a warning when that was more than 2 hours ago ("That is too long ago; check the cron job."). Below are the command line to put in the cron job and the web-cron address with the cron key, both ready to copy. The key is made at installation; if it is missing, opening this page makes one.

Last 30 days. One line per day with the number of task runs and, in red, how many failed. Click a day to see every run of that day.

Tasks. Every task in the table with:

ColumnShows
TaskIts description and, in small type, its name (the name you give run-task on the command line).
How oftenEvery N minutes, Every N hours, Daily or Monthly.
Last runWhen it last ran.
ResultOK or Failed, and the result line of the last run. Tasks that are in the table but not built in this version show "Comes with a later version".
Next runWhen it is next due, "Next cron run" when it has never run, or "Turned off". A task that is running now is marked "running".
Run nowRuns the task at once, whatever its schedule, and shows its result at the top of the page. Written to the activity log. If another run holds the task, the answer is "another run is busy with it".
Turn off / Turn onDisables or enables the task. A disabled task is greyed out and never runs. Written to the activity log.

Recent runs that did something. The last 60 runs whose result was not "nothing to do" (results such as "0 ...", "turned off", "off" or "no mailboxes" are left out), with when, the task, the result and the seconds it took. Runs started by hand are marked "(by hand)". When a day is chosen above, this box shows every run of that day instead.

The tasks

Every row of the task table, in its order on the page. Daily tasks run at the daily hour; monthly tasks on the first day of the month. The task names are what php cli.php run-task NAME and the Automation Status page use.

TaskRunsWhat it does
exchange-rates (Update exchange rates)DailyWhen "Update exchange rates daily" (Automation Settings, Currency tab) is on: fetches today's rates for every currency except the default from open.er-api.com and stores them. When "Recalculate prices in other currencies" is also on, every price list is worked out again from the default currency. Result: "4 rates updated, 12 price lists recalculated", or "turned off".
create-invoices (Create renewal invoices)DailyMakes the renewal invoices: for each client, one invoice with one line per period of each service, add-on and domain whose next period starts within the invoicing window ("Make invoices this many days before the due date", with its per-cycle and domain variants), plus billable items that are due. With "Invoice the next period even if the last one is unpaid" off, an item with an unpaid invoice waits. Credit is applied when "Use credit on new invoices automatically" is on. Clients (or groups) marked "a separate invoice for each item" get one invoice per item. Each item's next invoice date moves forward so nothing is invoiced twice. Sends the "invoice created" email, or "payment received" when credit paid the whole invoice. Result: "3 invoices created".
late-fees (Add late fees)DailyWhen "Add the late fee this many days after" is more than 0 and a late fee is set (General Settings, Invoices tab): adds one "Late payment fee" line to each unpaid invoice that is that many days past due and has no late fee yet. Percentage of the total or a fixed amount, converted to the invoice's currency, at least the smallest late fee; taxed when "Tax late fees" is on. Clients exempt from late fees are skipped.
capture-payments (Charge saved cards)DailyCharges a client's saved payment method for unpaid invoices from "Charge saved payment methods this many days before the due date" onwards. Skips clients marked "never charge saved cards automatically" and closed clients. After a failed charge it tries again once a week for "Try again every week for (weeks)", or not at all with "Try only once". Result: "2 charged, 1 failed".
invoice-reminders (Send payment reminders)DailyWhen "Send payment reminders" is on: sends the "invoice reminder" email the set number of days before the due date (once per invoice, only when the invoice was issued before that day), and the first, second and third overdue notices the set days after. When several notices fall due on the same day only the latest is sent. Invoices with nothing left to pay, and clients marked "no overdue notices", are skipped.
invoice-auto-cancel (Cancel long-unpaid invoices)DailyWhen "Cancel invoices unpaid for this many days" is more than 0: cancels unpaid invoices that many days past due, provided no credit and no payment was ever applied to them.
domain-renewal-notices (Send domain renewal notices)DailyFor each number in "Domain renewal notices (days before; negative = after)", emails the client whose domain expires that many days from today ("domain renewal notice"), or expired that many days ago ("domain expired"), with the expiry date, the days left, the renewal price and whether it auto-renews. Each notice goes once per domain. Free domains are skipped when "Send notices for free domains too" is off.
cancellation-requests (Carry out cancellation requests)DailyWhen "Carry out end-of-period cancellations" is on: terminates services with an open cancellation request that is immediate, or whose next due date has arrived, with status "cancelled". Unpaid renewal invoices of the service are cancelled when "Cancel unpaid invoices of cancelled services" is on.
suspensions (Suspend overdue services)DailyWhen "Suspend overdue services" is on: suspends active services that have an unpaid invoice "Days after the due date" (default 5) old, running the server module's suspend action and emailing the client when "Email the client when suspended" is on. Skips services marked "no automatic suspension" (for ever, or until a date not yet reached) and clients in a group exempt from suspension. Result: "3 suspended, 1 failed".
terminations (Terminate long-overdue services)DailyWhen "Terminate long-overdue services" is on: terminates active or suspended services with an unpaid invoice "Days after the due date" (default 30) old, running the module's terminate action. The same exemptions as for suspension apply.
fixed-term (Close fixed-term services)DailyTerminates active or suspended services of products with "terminate after N days" once that many days have passed since the service was set up.
close-tickets (Close inactive tickets)DailyWhen "Close tickets with no reply for this many hours" is more than 0: closes tickets in a status marked "auto close" whose last message is from staff and older than that, logging "Closed after N hours without a reply" on the ticket and emailing the client. Then, when "Delete attachments of closed tickets after (months)" is more than 0, deletes the attachment files of tickets closed longer than that.
affiliate-commissions (Release affiliate commissions)DailyReleases pending commissions whose waiting time ("Days before a commission is released") is over onto the affiliate's balance. A commission is dropped when the referred service was cancelled, terminated or marked fraud, when the invoice was refunded or cancelled, or when the affiliate is no longer usable. Result: "4 released, 1 dropped (service cancelled or invoice refunded)".
affiliate-reports (Send affiliate monthly reports)MonthlyWhen the affiliate programme and "Send affiliates a monthly report" are on: emails every affiliate of an active client the "affiliate report" for the month just ended (visits, sign-ups, earnings, balance). Sent once per month; a second run in the same month answers "already sent for 2026-09".
email-marketer (Send email marketer emails)DailyRuns every enabled rule under Utilities > Email Marketer: client rules N days after sign-up or last sign-in with a condition, service rules N days after the order, before the due date or after the service ended. Each rule sends once per client or service (once per renewal for "before due"); days missed by a cron outage are caught up for 3 days; rules marked as marketing go only to clients who agreed to marketing email. Result: "5 sent, 1 skipped (no address or general email turned off)".
card-expiry-notices (Warn about expiring cards)DailyOn or after the "Day of the month for card expiry notices" (default 25), emails clients whose saved card expires this month ("card expiring"), once per card. On earlier days the result is "not the day yet".
usage-update (Read disk and bandwidth usage)DailyWhen "Read disk and bandwidth use from servers" is on: asks the server module for the disk and bandwidth use of every active or suspended service that has a username and a server.
overage-billingMonthlyNot built yet. Shows "Comes with a later version".
domain-status (Mark expired domains)DailyActive domains whose expiry date has passed become "expired".
domain-sync (Sync domains with registrars)Every 4 hoursWhen "Sync domains with the registrars" is on: for up to 50 domains at a registrar that were not synced in the last 20 hours (oldest first), reads the status and expiry date from the registrar and updates the domain. With "Sync also moves the next due date" on, the next due and next invoice dates follow the expiry date. Result: "50 synced, 2 could not be read".
transfer-sync (Follow domain transfers)Every 4 hoursAsks the registrar about each domain in "pending transfer". A finished transfer makes the domain active and emails the client ("domain transfer done"); a failed one cancels the domain, emails the client ("domain transfer failed") and makes a staff task. Transfers that are staff tasks are left alone.
client-statusDailyNot built yet. Shows "Comes with a later version". The setting "Client status follows their products" waits for it.
prune (Remove old records)DailyDeletes data past its time: sessions idle for a day, expired bans, old sign-in failure counters, carts untouched for 30 days, activity log lines older than "Keep the activity log for (days)", module log entries older than "Keep the module log for (days)", unaccepted invitations past their 7 days, task runs and licence checks older than 90 days, and PDF invoice copies in storage/attachments/pdf older than 90 days. Result: "312 old records removed".
jobs (Send queued email and jobs)Every minuteWorks the background job queue: sends queued emails (up to 500 per run, for at most 4 minutes), retrying failures after 2, 8, 18, 32 and 50 minutes and marking them failed after the sixth attempt. Result: "12 done, 0 failed".
backupDailyWrites a gzip SQL dump of every table into storage/backups (see Settings > Database Backups) and deletes backups older than "Keep database backups for (days)"; the newest is always kept. Result: the file name, the number of tables and rows and the size.
daily-reportDailyNot built yet. Shows "Comes with a later version".
module-retries (Retry failed server and registrar actions)HourlyTries the failed server actions (create, suspend, unsuspend, terminate, change package) and registrar actions (register, transfer, renew) waiting under Pending Module Actions, up to 20 of each per run and up to 5 attempts each. An action whose service or domain has since been closed is marked done. Result: "2 done; domains: 1 done".
ticket-escalations (Apply ticket escalation rules)Every 5 minutesApplies the rules under Settings > Escalation Rules to tickets that have waited longer than the rule's minutes, matching the rule's departments, statuses and priorities: moves the department, changes the priority or status, flags the ticket to a staff member, adds a reply, and emails the chosen staff. Each rule acts once per waiting period of a ticket.
ticket-mail (Collect support email)Every 5 minutesFor every department with a mailbox set up (POP3 or IMAP under Settings > Support Departments): collects up to 50 messages, turns each into a new ticket or a reply, and deletes it from the mailbox. Result: one entry per department, such as "Support: 3; Sales: connection refused", or "no mailboxes". Email piped from the mail server goes through php cli.php pipe-ticket instead.
update-checkDailyAsks the licence server for releases newer than this copy and remembers the newest one signed with CoreInto's release key. Result: "CoreInto 0.32.0 is available", "up to date", or the reason (no licence key, the licence server could not be reached or refused, the licence is restricted). The result is shown on Utilities > Update CoreInto.
licence-checkEvery hour (added by database change 0022)Checks this site's CoreInto licence with the licence server when a check is due: a day after the last answer, an hour after a failure, then every six hours. Result: "not due (licensed)", "licence licensed", or "could not check: REASON". See CoreInto licence.

Three early task names (escalations, mail-import, server-usage) were replaced by ticket-escalations, ticket-mail and the usage work above; an update removes them from the table.

The daily run and the settings that steer it

The daily tasks run at one hour of the day, one after another, in the order of the table. The result of each is kept on Automation Status, and the dashboard's Automation Overview widget turns red when no daily task has run for 26 hours.

When the daily run finishes, the addresses under "Email the daily summary to" (Automation Settings, Schedule tab) receive "Automation summary for <date>": tiles with what each task did, a green line when every task completed or a red line naming the tasks that failed with their messages, and a link to Automation Status for that day. The rule "Daily run failed" under Settings > Notifications can also message staff or a webhook.

Setting (Settings > Automation Settings)TabSteers
Hour of the daily runScheduleWhen the daily and monthly tasks run, in the time zone set under General Settings, Localisation tab.
Suspend overdue services; Days after the due date; Email the client when suspendedSuspensionsuspensions
Unsuspend on payment; Email the client when unsuspendedSuspensionWhat a payment does to a suspended service (not a task: it happens when the invoice is paid).
Terminate long-overdue services; Days after the due dateSuspensionterminations
Make invoices this many days before the due date, and the per-cycle and domain variantsBillingcreate-invoices
Send payment reminders; Unpaid reminder, days before; First, Second, Third overdue noticeBillinginvoice-reminders
Add the late fee this many days afterBillinglate-fees (the fee itself is on General Settings, Invoices tab)
Cancel invoices unpaid for this many daysBillinginvoice-auto-cancel
Charge saved payment methods this many days before; Try only once; Try again every week forPayment capturecapture-payments
Day of the month for card expiry noticesPayment capturecard-expiry-notices
Update exchange rates daily; Recalculate prices in other currenciesCurrencyexchange-rates
Domain renewal notices; Send notices for free domains tooDomainsdomain-renewal-notices
Close tickets with no reply for this many hours; Delete attachments of closed tickets afterSupportclose-tickets
Carry out end-of-period cancellationsOthercancellation-requests
Read disk and bandwidth use from serversOtherusage-update
Keep the module log for (days); Keep the activity log for (days) (General Settings, Other tab)Data retentionprune
Keep database backups for (days)Data retentionbackup
Offer beta releasesUpdatesupdate-check

Settings on General Settings that the tasks also read: "Invoice the next period even if the last one is unpaid", "Use credit on new invoices automatically" and the late fee fields (Invoices tab); "Sync domains with the registrars", "Sync also moves the next due date" and "Days before expiry for the next due date" (Domains tab); "Days before a commission is released" and "Send affiliates a monthly report" (Affiliates tab); "Cancel unpaid invoices of cancelled services" (Invoices tab). Every setting is described in Settings.

Running a task by hand

Two ways:

  • On Utilities > Automation Status, press Run now next to the task. The result appears at the top of the page and the run is listed as "(by hand)".
  • On the server's command line: php cli.php run-task NAME, for example php cli.php run-task create-invoices. See Command line.

Both run the task whether or not it is due, and whether or not it is turned off on the status page; a task that is not built yet, or does not exist, is refused.

When something looks wrong

SymptomWhere to look
"The automation has never run" on Automation Status, or a red Automation Overview on the dashboardThe cron job is missing or its command is wrong. Copy the command from Automation Status. Run it once by hand with -v to see any error.
"Last run ... That is too long ago"The cron job stopped running. Check it in the hosting control panel.
A task shows FailedRead its result line; the full error is also in storage/logs/error-YYYY-MM.log when it came from PHP.
Nothing runs after an updateOpen the admin area: the Database Update page is waiting. The automation waits until the update is applied.
Emails are written but not sentThe jobs task must run every minute; check it is enabled. Then check the Email Message Log for the mail server's answer, and "Do not send any email" on General Settings, Mail tab.

Frequently asked questions

What does "Automation" cover in CoreInto?

CoreInto's recurring work (renewal invoices, reminders, late fees, suspensions, domain syncing, ticket rules, email sending, backups) is done by automation tasks that cron.php runs from a cron job on your hosting account. CoreInto&#039;s recurring work (renewal invoices, reminders, late fees, suspensions, domain syncing, ticket rules, email sending, backups) is done by automation tasks that cron.php runs from a cron job on your hosting account. This chapter explains how the runs work, the Automation Status page, every task with how often it runs and what it does, and the settings that steer the daily run.

Where do I find more help?

Use the Help button on this site, browse the Administrator guide on coreinto.com, or submit a ticket at https://system.coreinto.com/contact with your panel version and the steps you tried.

Submit a ticket