{"id":"bemery2/cron","name":"cron","scope":"bemery2","platform":"roblox","description":"Cron the chronoligical task scheduler\n\nThis library was made by Silent Studios,\nfor the purpose of making JavaScript like automated features.\nIt wasn't intended for performance-constrained scenarios;\nthe only real niche scenario this was intended for was defining\nroll over times for stuff like item shops.\n\nlocal Task = require(Path.to.Cron);\n\nlocal Job = Task.new({\n\tUTC = -5;\n\tStart = DateTime.fromLocalTime(2022, 1, 1);\n\tEnd = DateTime.fromLocalTime(2022, 12, 31);\n\tTime = \"*/15\";\n\tCallback = function()\n\t\tprint(\"Here\");\n\tend;\n});\n\ntask.delay(5, Job.Stop, Job);\n","version":"1.1.0","latest":"1.1.0","versions":["0.0.1","0.0.2","0.0.3","0.0.4","0.1.0","0.1.1","0.1.2","0.1.3","0.2.0","1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6","1.0.7","1.0.8","1.0.9","1.1.0"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{},"integrity":"243f371ee6de2107e30351346d0e3e0162d5134f1e50d5c573169691a4c7e77c","likes":0,"downloads":0,"install":"forest install bemery2/cron","url":"https://forest.dev/p/roblox/bemery2/cron","files":"https://api.forest.dev/ai/package/roblox/bemery2/cron/files","readme":"Cron (This implementation is intended for Roblox)\r\n\r\nThis library was made by Silent Studios,\r\nfor the purpose of making JavaScript-like automated features.\r\nIt wasn't intended for performance-constrained scenarios;\r\nthe only real scenarios we designed this for was to define\r\nroll over times for stuff like item shops.\r\n\r\n```\r\nlocal Task = require(Path.to.Cron);\r\n\r\nlocal Job = Task.new({\r\n\tUTC = -5; -- Optional, Defaults to 0, Time Zone Offset\r\n\tStart = DateTime.fromLocalTime(2022, 1, 1); -- Optional Start Date\r\n\tEnd = DateTime.fromLocalTime(2022, 12, 31); -- Optional End Date\r\n\tTime = \"0 0 */2\"; -- Optional Cron Time, defaults to \"*\", example runs every 2 hours\r\n\tCallback = function()\r\n\t\tprint(\"Here\");\r\n\tend,\r\n});\r\n\r\nprint(os.date(\"!*t\", Job.Next));\r\n```\r\n\r\nExplanation/Examples of Time Expressions\r\n\r\n  can consists of:\r\n  ```\r\n    \"*\" - Means that this parameter doesn't matter, the script by default uses this for any parameters that haven't been filled.\r\n    \"*/number\" - This acts as a modulos so say I have a string that purely consists of \"*/10\" being it's in the first parameter it\r\n      indicates that I want the function to fire every 10 in real time seconds.\r\n    \"number-number\" - Filling a parameter with a number-number like \"1-7\" means that you want it to occur between 1 and 7 inclusively.\r\n    \"number\" -This last type determines if you want something to be specific, so \"30\" being it's by itself would happen at 30 seconds real time; this does differ from \"*/30\".\r\n  ```\r\n \r\n  Examples:\r\n  ```\r\n    \"0 0 8\" -- Every day at 8am under the pretense of it being UTC-5;\r\n    \"0 */30\" -- Every 30 minutes.\r\n    \"0 30\" -- Every hour at xx:30:00.\r\n    \"0 0 0\" -- Every day at midnight.\r\n  ```\r\n","readmeTruncated":false}