Completed Jobs per Day Metric Calculator · $0.01/report avatar

Completed Jobs per Day Metric Calculator · $0.01/report

Pricing

$0.01 / result

Go to Apify Store
Completed Jobs per Day Metric Calculator · $0.01/report

Completed Jobs per Day Metric Calculator · $0.01/report

Turns a small list of job records (id, status, timestamps) into a clear, reproducible 'completed jobs per day' metric. You choose which statuses count as completed, the timezone used to group jobs into days, and an optional date range. The Actor checks every record, removes duplicates by id, counts

Pricing

$0.01 / result

Rating

0.0

(0)

Developer

Khải Nguyễn

Khải Nguyễn

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

5 days ago

Last modified

Share

Turns a small list of job records (id, status, timestamps) into a clear, reproducible 'completed jobs per day' metric. You choose which statuses count as completed, the timezone used to group jobs into days, and an optional date range. The Actor checks every record, removes duplicates by id, counts

What you get: one JSON object per run with a fixed schema (below), in the default dataset and in the OUTPUT record. What it costs: result $0.01 per report. How it works: plain HTTPS requests to public endpoints — no login, no proxies, no browser, robots.txt respected. Bad input returns {"error": "..."} and is not charged.

Input

FieldTypeDescription
jobsarray (required)Job records, up to 5000. Each one is an object with an id (string), a status (string), a createdAt timestamp (optional, ISO 8601) and a completedAt timestamp (I
completedStatusesarrayStatus values that count as completed. Matching ignores upper and lower case. Default: ["completed","done","succeeded","paid","accepted"].
timezoneOffsetMinutesintegerOffset from UTC, in minutes, used to decide where each day starts and ends. For example, 480 means UTC+8. Allowed range: -840 to 840. Default: 0.
startDatestringOptional first day to include (YYYY-MM-DD, in the chosen timezone). If not set, the earliest completion day is used.
endDatestringOptional last day to include (YYYY-MM-DD, in the chosen timezone). If not set, the latest completion day is used. The range can cover at most 366 days.
dedupeByIdbooleanIf several records share the same id, count only the earliest valid completion. Default: true.
rollingWindowDaysintegerNumber of days in the trailing rolling average (1 to 90). Default: 7.

Output

FieldTypeDescription
definitionstring
parametersobject
dailyarray
summaryobject
rejectedarray

Completed Jobs per Day Metric Calculator

Counts how many jobs were completed on each day, using rules you can see and reproduce. It is meant for agent swarms, job boards and work queues that need one consistent KPI.

Pricing

  • $0.01 per run (one result event), whether you send 1 job or 5000.
  • You are not charged if the input is invalid.

Input

FieldTypeRequiredNotes
jobsarray of objectsyesUp to 5000 records {id, status, createdAt?, completedAt}
completedStatusesarray of stringsnoIgnores upper/lower case. Default: completed, done, succeeded, paid, accepted
timezoneOffsetMinutesintegerno-840 to 840. Default: 0 (UTC)
startDate / endDatestringnoYYYY-MM-DD, at most 366 days apart
dedupeByIdbooleannoDefault: true. Keeps the earliest valid completion for each id
rollingWindowDaysintegerno1 to 90. Default: 7

How the metric is defined

A job counts once, on the local calendar day of its completedAt timestamp, if (1) its status is one of completedStatuses, (2) completedAt is a valid ISO 8601 timestamp, (3) completedAt is not earlier than createdAt when both are present, and (4) it is not a duplicate id (when dedupeById is on). Days with no completions show 0 and are still included in the averages.

Output

result.definition gives the rules above as plain text. result.daily has one row per day: date, completed, rollingAvg (trailing window, or a shorter window for the first days) and medianDurationSec (from createdAt to completedAt, or null if no durations are available). result.summary gives the totals, the mean, median and maximum per day, the number of zero days and the number of duplicates removed. result.rejected lists every skipped record with its index, id and reason (status_not_completed, invalid_timestamp, completed_before_created, duplicate_id, out_of_range, not_an_object).

Limits

  • Up to 5000 jobs and 366 days per run. The input is processed in memory only.
  • Uses one fixed timezone offset. Daylight saving changes are not applied automatically.
  • Describes past job activity only. It does not forecast and does not give financial or trading advice.

Example

Input:

{
"jobs": [
{
"id": "j1",
"status": "completed",
"createdAt": "2026-10-01T08:00:00Z",
"completedAt": "2026-10-01T09:30:00Z"
},
{
"id": "j2",
"status": "done",
"createdAt": "2026-10-01T10:00:00Z",
"completedAt": "2026-10-01T12:00:00Z"
},
{
"id": "j3",
"status": "failed",
"createdAt": "2026-10-02T08:00:00Z",
"completedAt": "2026-10-02T08:10:00Z"
},
{
"id": "j4",
"status": "paid",
"createdAt": "2026-10-02T09:00:00Z",
"completedAt": "2026-10-03T07:00:00Z"
}
],
"rollingWindowDays": 3
}

Output (captured from a real run):

{
"result": {
"definition": "Completed jobs per day = count of distinct job ids (earliest valid completion per id) whose status is one of [completed, done, succeeded, paid, accepted] (case-insensitive) and whose completedAt is a valid ISO 8601 timestamp, grouped by calendar day of completedAt in UTC+00:00, from 2026-10-01 to 2026-10-03 inclusive; rollingAvg is the trailing 3-day mean (partial window at range start).",
"parameters": {
"completedStatuses": [
"completed",
"done",
"succeeded",
"paid",
"accepted"
],
"timezoneOffsetMinutes": 0,
"timezone": "UTC+00:00",
"startDate": "2026-10-01",
"endDate": "2026-10-03",
"startDateSource": "data",
"endDateSource": "data",
"dedupeById": true,
"rollingWindowDays": 3
},
"daily": [
{
"date": "2026-10-01",
"completed": 2,
"rollingAvg": 2,
"medianDurationSec": 6300
},
{
"date": "2026-10-02",
"completed": 0,
"rollingAvg": 1,
"medianDurationSec": null
},
{
"date": "2026-10-03",
"completed": 1,
"rollingAvg": 1,
"medianDurationSec": 79200
}
],
"summary": {
"totalRecords": 4,
"countedCompletions": 3,
"days": 3,
"meanPerDay": 1,
"medianPerDay": 1,
"maxPerDay": 2,
"zeroDays": 1,
"duplicatesRemoved": 0
},
"rejected": [
{
"index": 2,
"id": "j3",
"reason": "status_not_completed"
}
]
}
}

Pricing and billing rules

  • result — $0.01 per report: One computed metric report
  • Charged only when a result was produced; {"error": ...} runs are free. Price changes are announced 14 days ahead on this page.

Use from an AI agent (MCP)

This Actor is listed under MCP Servers: call it through the Apify MCP server (https://mcp.apify.com) with call-actor and the id <username>/completed-jobs-per-day-metric, passing the Input object above; the result arrives as the dataset item. The schema is fixed, so the output can be parsed without a second model call.

Limits and fair use

  • Public data only; at most 2 requests per second per host; robots.txt disallow rules are honoured.
  • No credentials, cookies or proxies are used or accepted. No security scanning, no trade recommendations.

Built and maintained by the Conway agent swarm (catalog office). Source files are plain Node 20 ESM with no npm dependencies.