Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Cron doesnt work #366

Closed
Edvo1901 opened this issue Jul 9, 2023 · 0 comments
Closed

[Bug] Cron doesnt work #366

Edvo1901 opened this issue Jul 9, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Edvo1901
Copy link

Edvo1901 commented Jul 9, 2023

Describe the bug
A bug in cron execution tasks

To Reproduce
Steps to reproduce the behavior:
I try to trigger this event but it wont work. However, instead of putting 1,4,6 (which is Sunday, Wed, Friday), if I put 1 only then it works. So basically the problem is that the cron cannot catch multiple value in my schedule

--Doesnt work
lib.cron.new("0 9 * * 1,4,6", function()
Notify(Text("text", "start"), "info", -1)
TriggerClientEvent("mb-pacifirobbery:client:SetupPowerStation", -1)
end)

--Working
lib.cron.new("0 9 * * 1", function()
Notify(Text("text", "start"), "info", -1)
TriggerClientEvent("mb-pacifirobbery:client:SetupPowerStation", -1)
end)

lib.cron.new("0 9 * * 4", function()
Notify(Text("text", "start"), "info", -1)
TriggerClientEvent("mb-pacifirobbery:client:SetupPowerStation", -1)
end)

@Edvo1901 Edvo1901 added the bug Something isn't working label Jul 9, 2023
Moozdzn added a commit to Moozdzn/ox_lib that referenced this issue Jul 29, 2023
commit 497bee8
Author: Linden <[email protected]>
Date:   Sat Jul 29 07:52:49 2023 +1000

    chore: update readme

commit 99519d3
Author: daZepelin <[email protected]>
Date:   Thu Jul 27 12:44:08 2023 +0300

    feat(web/dialog): precision prop for number input (overextended#372)

    * feat(web/input): added precision prop for number input

    * fix(web/input): added missing disabled prop to checkbox

    * fix(web/input): correct icon for debug data

    * fix(web/input): remove step prop from typings

    * fix(web/debug): remove step prop

commit 95cdbd2
Author: Manifest Bumper <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Thu Jul 27 04:29:34 2023 +0000

    chore: bump manifest version to v3.7.2

commit d2c5be8
Author: Linden <[email protected]>
Date:   Thu Jul 27 00:38:36 2023 +1000

    fix(client/zones): setDebug early return

commit 89b9016
Author: Linden <[email protected]>
Date:   Wed Jul 26 12:47:07 2023 +1000

    fix(init): enable ignore_invalid for msgpack

    Needed to prevent errors when packing glm polygons and such.

commit 8f0a8b3
Author: Manifest Bumper <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Tue Jul 25 04:14:41 2023 +0000

    chore: bump manifest version to v3.7.1

commit fe0f289
Author: Linden <[email protected]>
Date:   Tue Jul 25 14:13:09 2023 +1000

    fix(client/zones): race condition when setting debug function

commit 7c0ee46
Author: Manifest Bumper <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Tue Jul 25 03:14:32 2023 +0000

    chore: bump manifest version to v3.7.0

commit b06ba2d
Author: Linden <[email protected]>
Date:   Tue Jul 25 01:59:39 2023 +1000

    chore: type fixes

commit 8f5880a
Author: BerkieBb <[email protected]>
Date:   Sun Jul 23 11:37:29 2023 +0200

    feat(zones): add setDebug and debugColour (overextended#369)

commit 84b7f97
Author: Linden <[email protected]>
Date:   Sun Jul 23 13:41:20 2023 +1000

    fix(server/logger): missing )

commit f641881
Author: Lukas Brūzga <[email protected]>
Date:   Sun Jul 23 06:14:44 2023 +0300

    fix(client/setVehicleProperties): force clear custom colours (overextended#375)

commit 588d26c
Author: Jerry <[email protected]>
Date:   Sun Jul 23 11:14:03 2023 +0800

    fix(client/vehicleProperties): don't set modLivery if no livery exists (overextended#374)

commit 2fafee4
Author: Jellyton <[email protected]>
Date:   Sat Jul 22 19:59:41 2023 -0700

    refactor(server/logger): remove text formatting from hostname (overextended#361)

commit 65a7990
Author: Jag <[email protected]>
Date:   Fri Jul 21 04:54:29 2023 -0700

    chore: various fix-ups from docs clean-up (overextended#363)

    - Add in missing js functions
      - getCurrentRadialId
      - requestScaleformMove
    - Change up math.tohex to maintain lowercase `0x` prefix
    - Add missing fields
    - Removed extra whitespaces

    Co-authored-by: Luke <[email protected]>

commit 1b8e1f0
Author: Zan <[email protected]>
Date:   Fri Jul 21 13:46:40 2023 +0200

    chore(locales): update hu.json (overextended#371)

commit 5b9bb53
Author: Luke <[email protected]>
Date:   Thu Jul 20 22:39:56 2023 +0200

    fix(web/skillcheck): fail on wrong key press

commit 9c90b5b
Author: Linden <[email protected]>
Date:   Mon Jul 17 23:35:53 2023 +1000

    fix(server/cron): prevent scheduling tasks for new days

    From 8488de.

commit 1492130
Author: Linden <[email protected]>
Date:   Mon Jul 17 22:48:33 2023 +1000

    fix(server/cron): getTimeUnit corrections

    Consistency between range and lists.
    Use different time comparisons for minute units.

commit 8488dec
Author: Linden <[email protected]>
Date:   Mon Jul 17 20:07:30 2023 +1000

    refactor(server/cron): allow getNextTime minute and hour "overflow"

    Per the Lua manual,
    "if sec is -10, it means 10 seconds before the time specified by the other fields".
    i.e. { min = 61, hour = 0 } is equal to { min = 1, hour = 1 }

    Should improve scheduling and help with overextended#368.

commit 9e2076f
Author: Linden <[email protected]>
Date:   Mon Jul 17 19:56:58 2023 +1000

    refactor(server/cron): types and formatting, simplify getMaxDaysInMonth

commit cfcb9c1
Author: Manifest Bumper <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Sun Jul 16 10:00:11 2023 +0000

    chore: bump manifest version to v3.6.3

commit 45f155f
Author: Luke <[email protected]>
Date:   Fri Jul 14 00:57:01 2023 +0200

    perf(package): only run points loop when there's at least one point

commit 6ab7196
Author: Linden <[email protected]>
Date:   Mon Jul 10 08:50:26 2023 +1000

    fix(server/cron): list expression should use >=

    Resolves overextended#366.

commit c6f621f
Author: Manifest Bumper <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Thu Jun 29 15:10:03 2023 +0000

    chore: bump manifest version to v3.6.2

commit 78e0e52
Author: RIOT <[email protected]>
Date:   Sun Jun 25 11:41:35 2023 +0200

    fix(web/input): block form submission with unclamped numbers (overextended#360)

commit 45e9588
Author: Luke <[email protected]>
Date:   Sun Jun 25 00:15:34 2023 +0200

    fix(web/input): don't allow user to submit form with unclamped numbers

commit 8a0f5e9
Author: Linden <[email protected]>
Date:   Tue Jun 20 09:19:27 2023 +1000

    fix(client/zones): prevent malformed polyzone deadlock with debug

    Temp workaround.

commit 35448ff
Author: Manifest Bumper <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Sat Jun 17 06:15:13 2023 +0000

    chore: bump manifest version to v3.6.1

commit 310b972
Author: Linden <[email protected]>
Date:   Sat Jun 17 16:11:08 2023 +1000

    fix(client/zoneCreator): require input confirmation

commit d070c63
Author: daZepelin <[email protected]>
Date:   Mon Jun 12 21:57:39 2023 +0300

    fix(cron) edge case fixes (overextended#345)

commit 0a3edcb
Author: Randolio <[email protected]>
Date:   Mon Jun 12 19:51:20 2023 +0100

    fix(imports/getClosestPed): correct variable name (overextended#348)

commit 1f76590
Author: Linden <[email protected]>
Date:   Tue Jun 13 00:36:17 2023 +1000

    fix(version): report unknown versions during checkDependency

    Rather than throwing potentially fatal and confusing errors we should
    just report the current version as 'unknown'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant