Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Hexagon/croner
/ functions
Functions
185 in github.com/Hexagon/croner
⨍
Functions
185
◇
Types & classes
11
↓ 1 callers
Method
getLastWeekday
* Calculates the last weekday (Mon-Fri) of a given month. * * @param year The target year. * @param month The target month (0-11). * @retu
src/date.ts:161
↓ 1 callers
Method
getMaxPatternValue
* Get the maximum value in a pattern for a given target. * Used when resetting components during backward recursion. * * @param target The ta
src/date.ts:1009
↓ 1 callers
Method
getNearestWeekday
* Calculates the nearest weekday (Mon-Fri) to a given day of the month. * Handles month boundaries. * * @param year The target year. * @pa
src/date.ts:185
↓ 1 callers
Method
handleNicknames
* Replace nicknames with actual cron patterns * * @param pattern Pattern, may contain nicknames, or not * * @returns Pattern, with cron ex
src/pattern.ts:830
↓ 1 callers
Method
handleNumber
* Nothing but a number, potentially with a modifier, left - handle that * * @param conf Current part, expected to be a number, as a string *
src/pattern.ts:389
↓ 1 callers
Method
handleRange
* Take care of ranges (e.g. 1-20) * * @param conf - Current part, expected to be a string like 1-20, can contain L for last * @param type - O
src/pattern.ts:639
↓ 1 callers
Method
handleRangeWithStepping
* Take care of ranges with stepping (e.g. 3-23/5) * * @param conf Current part, expected to be a string like 3-23/5 * @param type One of "sec
src/pattern.ts:566
↓ 1 callers
Method
handleStepping
* Handle stepping (e.g. * / 14) * * @param conf Current part, expected to be a string like * /20 (without the space) * @param type One of "se
src/pattern.ts:677
↓ 1 callers
Method
hourPhrase
"of hour 0-6"
src/describe.ts:55
↓ 1 callers
Method
ifAlso
"(if it is also Friday)", for day-of-month AND day-of-week
src/describe.ts:77
↓ 1 callers
Method
ifAlsoOneOf
"(if it is also one of: ...)", for day-of-month AND several day-of-week descriptions
src/describe.ts:79
↓ 1 callers
Method
increment
* Increment to next run time * * @param pattern The pattern used to increment the current date. * @param options Cron options used for increm
src/date.ts:715
↓ 1 callers
Function
isCronCallback
(v: unknown)
src/utils.ts:21
↓ 1 callers
Method
isNthWeekdayOfMonth
* Check if the given date is the nth occurrence of a weekday in its month. * * @param year The year. * @param month The month (0 for January,
src/date.ts:227
↓ 1 callers
Method
isStopped
* Indicates whether or not the cron job is permanently stopped * * @returns Running or not
src/croner.ts:465
↓ 1 callers
Function
iso
(dates: Date[])
test/interval-dst.test.ts:9
↓ 1 callers
Function
iso
(dates: Date[])
test/dst-croner-rust.test.ts:27
↓ 1 callers
Function
iso
(dates: Date[])
test/fixed-time-rule.test.ts:11
↓ 1 callers
Method
lastDayOfWeekOfMonth
"the last Friday of the month" (5L)
src/describe.ts:72
↓ 1 callers
Function
local
(d: Date)
test/dst-croner-rust.test.ts:51
↓ 1 callers
Method
minutePastEveryHourPhrase
"minute 5 past every hour"
src/describe.ts:53
↓ 1 callers
Method
minutePhrase
"minute 2, 4, and 6"
src/describe.ts:51
↓ 1 callers
Function
names
(test: (v: number) => boolean)
src/describe.ts:326
↓ 1 callers
Function
next
(pattern: string, n: number, from: string)
test/strict-numbers.test.ts:75
↓ 1 callers
Function
noWildcard
(pattern: string)
test/fixed-time-rule.test.ts:18
↓ 1 callers
Method
nthDayOfWeekOfMonth
"the 3rd Tuesday of the month" (2#3)
src/describe.ts:74
↓ 1 callers
Function
offsetAt
(ms: number)
src/helpers/timezone.ts:201
↓ 1 callers
Method
onPhrase
"on Monday"
src/describe.ts:44
↓ 1 callers
Function
pad
(n: number)
src/describe.ts:94
↓ 1 callers
Function
parseISOLocal
* Helper function that takes an ISO8601 local date time string and creates a TimePoint. * Throws on failure. Throws on invalid date or time. * * @p
src/helpers/timezone.ts:65
↓ 1 callers
Method
partToArray
* Convert current part (seconds/minutes etc) to an array of 1 or 0 depending on if the part is about to trigger a run or not.
src/pattern.ts:328
↓ 1 callers
Method
pastHourPhrase
"hour 0 and 12", used by everyPastPhrase
src/describe.ts:59
↓ 1 callers
Method
pause
* Pause execution * * @returns Wether pause was successful
src/croner.ts:537
↓ 1 callers
Method
peek
* Returns the next scheduled date without advancing the cursor. * * @returns The next scheduled date, or null if the schedule is exhausted.
src/croner.ts:1026
↓ 1 callers
Function
previous
(pattern: string, n: number, from: string)
test/strict-numbers.test.ts:78
↓ 1 callers
Method
previousRun
* Return previous run start time * * @returns Previous run time
src/croner.ts:492
↓ 1 callers
Method
recurse
* Increment to next run time recursively. * * This function traverses the date components (year, month, day, hour, minute, second) * to find
src/date.ts:582
↓ 1 callers
Method
recurseBackward
* Find previous match by recursively checking pattern parts in reverse. * * This is the backward equivalent of the recurse() method. It searches
src/date.ts:795
↓ 1 callers
Method
recurseBackwardStep
* One step of recurseBackward(). Returns the level to continue at, or the result. * * @private
src/date.ts:816
↓ 1 callers
Method
recurseStep
* One step of recurse(). Returns the level to continue at, or the result. * * @private
src/date.ts:603
↓ 1 callers
Method
replaceAlpha
* Replace alpha names (day/month) with numeric values using a mapping. A name has to stand * alone, or SUN6 would be read as 6 and JANFEB as 12.
src/pattern.ts:745
↓ 1 callers
Method
resume
* Resume execution * * @returns Wether resume was successful
src/croner.ts:548
↓ 1 callers
Function
runOnFakeClock
* Runs a scheduled job on a fake clock, and returns when each run fired
test/interval-dst.test.ts:81
↓ 1 callers
Function
runOnFakeClock
* Runs a scheduled job on a fake clock, and returns when each run fired
test/dst-croner-rust.test.ts:143
↓ 1 callers
Function
runs
(pattern: string, n: number)
test/alternative-weekdays.test.ts:315
↓ 1 callers
Function
runs
(pattern: string, alternativeWeekdays = false)
test/strict-names.test.ts:55
↓ 1 callers
Function
runs
(pattern: string, n = 2)
test/strict-numbers.test.ts:49
↓ 1 callers
Function
runs
(pattern: string)
test/ocps-1.0.test.ts:172
↓ 1 callers
Method
secondPhrase
"second 10-20"
src/describe.ts:49
↓ 1 callers
Method
setNthWeekdayOfMonth
* Handle the nth weekday of the month logic using hash sign (e.g. FRI#2 for the second Friday of the month) * * @param index Weekday, example: 5
src/pattern.ts:850
↓ 1 callers
Method
throwAtIllegalCharacters
* After converting JAN-DEC, SUN-SAT only 0-9 * , / - are allowed, throw if anything else pops up * @throws On error
src/pattern.ts:368
↓ 1 callers
Method
timeOfDay
Formats a time of day, "14:00" or "14:00:30". Override for a 12-hour clock.
src/describe.ts:33
↓ 1 callers
Function
timePointsMatch
* Helper function to check if two TimePoints represent the same local time * * @param tp1 - First TimePoint * @param tp2 - Second TimePoint * @ret
src/helpers/timezone.ts:40
↓ 1 callers
Function
toWholeSecond
* Runs are on whole seconds, so a time between two seconds counts as the next second
src/options.ts:277
↓ 1 callers
Function
unrefTimer
(timer: NodeJS.Timeout | number)
src/utils.ts:32
↓ 1 callers
Function
utcDate
(year: number, month: number, day: number)
test/early-years.test.ts:5
↓ 1 callers
Method
weekdayNearestDay
"the weekday nearest day 15" (15W)
src/describe.ts:70
↓ 1 callers
Method
yearPhrase
"year 2025"
src/describe.ts:61
Method
[Symbol.iterator]
* Implements the ECMAScript Iterable protocol, enabling `for...of` and destructuring.
src/croner.ts:1052
Method
_startAt
* The startAt and stopAt options, which CronOptionsHandler has made CronDates
src/croner.ts:166
Method
_stopAt
()
src/croner.ts:169
Function
construct
(target, args, newTarget)
test/dst-overlap-precision.test.ts:95
Function
construct
(target, args, newTarget)
test/interval-dst.test.ts:89
Function
construct
(target, args, newTarget)
test/dst-croner-rust.test.ts:156
Function
construct
(target, args, newTarget)
test/clockstep.test.ts:12
Function
construct
(target, args, newTarget)
test/day-offset.test.ts:275
Function
construct
(target, args, newTarget)
test/croner.test.ts:1203
Function
construct
(target, args, newTarget)
test/iterator.test.ts:268
Method
constructor
( pattern: string | Date, fnOrOptions1?: CronOptions<T> | CronCallback<T>, fnOrOptions2?: CronOpti
src/croner.ts:216
Method
constructor
* @param cron - The Cron instance to iterate over * @param startAt - Optional starting date for iteration. Defaults to current time if omitted.
src/croner.ts:993
Method
constructor
(d?: CronDate<T> | Date | string | null, tz?: string | number)
src/date.ts:108
Method
constructor
( pattern: string, timezone?: string, options?: { mode?: CronMode; alternativeWeekdays
src/pattern.ts:77
Function
get
(target, property, receiver)
test/dst-overlap-precision.test.ts:98
Function
get
(target, property, receiver)
test/interval-dst.test.ts:92
Function
get
(target, property, receiver)
test/dst-croner-rust.test.ts:159
Function
get
(target, property, receiver)
test/clockstep.test.ts:15
Function
get
(target, property, receiver)
test/day-offset.test.ts:278
Function
get
(target, property, receiver)
test/croner.test.ts:1206
Function
get
(target, property, receiver)
test/iterator.test.ts:271
Method
isAhead
(date: Date)
src/croner.ts:914
Method
isFixed
(part: string, values: number[])
src/pattern.ts:318
Function
restore
()
test/clockstep.test.ts:37
Function
setNow
(time: number)
test/clockstep.test.ts:34
Method
step
(date: CronDate<T>, hasPrevious: boolean)
src/croner.ts:888
Function
then
(resolve: () => void, reject: (reason: unknown) => void)
test/async-catch.test.ts:29
← previous
101–185 of 185, ranked by callers