• Stars
    star
    281
  • Rank 147,023 (Top 3 %)
  • Language
    PHP
  • License
    MIT License
  • Created over 5 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

⏰️ Makes CRON expressions human-readable

CRON Translator

⏰️ Makes CRON expressions human-readable

intro-rounded

Installation

composer require lorisleiva/cron-translator

Usage

use Lorisleiva\CronTranslator\CronTranslator;

CronTranslator::translate('* * * * *');       // => Every minute
CronTranslator::translate('30 22 * * *');     // => Every day at 10:30pm
CronTranslator::translate('0 16 * * 1');      // => Every Monday at 4:00pm
CronTranslator::translate('0 0 1 1 *');       // => Every year on January the 1st at 12:00am
CronTranslator::translate('0 0 1 * *');       // => The 1st of every month at 12:00am
CronTranslator::translate('0 * * * 1');       // => Once an hour on Mondays
CronTranslator::translate('* 1-20 * * *');    // => Every minute 20 hours a day
CronTranslator::translate('0,30 * * * *');    // => Twice an hour
CronTranslator::translate('0 1-5 * * *');     // => 5 times a day
CronTranslator::translate('0 1 1-5 * *');     // => 5 days a month at 1:00am
CronTranslator::translate('*/2 * * * *');     // => Every 2 minutes
CronTranslator::translate('* 1/3 2 * *');     // => Every minute of every 3 hours on the 2nd of every month
CronTranslator::translate('1-3/5 * * * *');   // => 3 times every 5 minutes
CronTranslator::translate('1,2 0 */2 1,2 *'); // => Twice an hour every 2 days 2 months a year at 12am

You may also provide a locale as a second argument and whether to format the time using the 24-hour format as a third argument.

CronTranslator::translate('30 18 * * *', 'fr');       // => Chaque jour à 6:30pm
CronTranslator::translate('30 18 * * *', 'fr', true); // => Chaque jour à 18:30

The following locales are currently supported. Feel free to PR more locales if you need them. 🙂

  • ar — Arabic
  • de — German
  • en — English
  • es — Spanish
  • fr — French
  • hi — Hindi
  • lv — Latvian
  • nl — Dutch
  • pt — Portuguese
  • ro — Romanian
  • sk — Slovak
  • vi — Vietnamese
  • zh — Chinese

More Repositories

1

laravel-actions

⚡️ Laravel components that take care of one specific task
PHP
2,449
star
2

laravel-deployer

🚀 Zero-downtime deployment out-of-the-box
PHP
1,666
star
3

laravel-docker

🐳 Generic docker image for Laravel Applications
Dockerfile
931
star
4

laravel-search-string

🔍 Generates database queries based on one unique string
PHP
770
star
5

tailwindcss-plugins

🔌🌊 Set of useful plugins for tailwindcss
JavaScript
284
star
6

javel

🎁 Simple, lightweight and customisable Laravel models in your JavaScript
JavaScript
277
star
7

artisan-ui

🧰 Run your artisan commands by pressing buttons
Blade
217
star
8

solana-twitter

Simple tweets as Solana accounts
Vue
201
star
9

solana-wallets-vue

Solana wallet integration for Vue 3
TypeScript
161
star
10

vuepress-plugin-seo

🔌 Generate SEO friendly meta header for every page
JavaScript
106
star
11

lody

🗄 Load files and classes as lazy collections in Laravel.
PHP
88
star
12

blog-google-calendar

🌐 Google Calendar Integration
PHP
49
star
13

vue-lab

👨‍🔬 Collection of reusable Vue.js goodies
Vue
45
star
14

laravel-add-select

🧱 Add your subSelect queries the Laravel way
PHP
33
star
15

blog-2019-vuepress

✍️ Personal website and blog (2019 edition)
Vue
30
star
16

vuepress-plugin-disqus

🔌 Register a global Disqus component to add to your layouts
JavaScript
29
star
17

request-controller

Use FormRequests as invokable controllers
PHP
28
star
18

dotfiles

❄️ Personal set of configurations for macOS
Shell
26
star
19

paparazzi

📸 Code base for the Single-Page Laravel course
PHP
16
star
20

kanuu-getting-started

Add billing to your app in 5 minutes with Paddle and Kanuu
PHP
12
star
21

solana-vue3-counter

A test repo for getting started with Anchor and Vue3
JavaScript
9
star
22

peppermint

[WIP] Metaplex SDK Mint example
Vue
7
star
23

enchant

🧙‍♂️ Auto-generated Laravel documentations [WIP]
PHP
7
star
24

minecravel

Just having fun with Minecraft mods (something Laravel related perhaps...)
Java
6
star
25

postpone

🦥 Handle asynchronous JS pipelines
TypeScript
5
star
26

learn-laravel-deployer

👨‍🏫 Dummy Laravel app used in the "Getting started with Laravel Deployer" video series
PHP
4
star
27

solana-core-programs

[WIP] Generated clients for core Solana programs
Rust
4
star
28

laravel-actions-docs

📚 Documentation for Laravel Actions
JavaScript
3
star
29

solana-trustpilot

A Umi/Kinobi demo
TypeScript
3
star
30

lab-deployer

Testing the deployment of a Laravel app with Deployer7
PHP
2
star
31

typedoc-plugin-expand-object-like-types

Expands TS definitions for object-like types
JavaScript
2
star
32

fail-fast-ci-tests

A GitHub Actions playground to figure out the best fail-fast strategy
2
star
33

js-next-cra-5

[WIP] Testing the Metaplex JS SDK on CRA 5
JavaScript
1
star
34

token-recipes

TypeScript
1
star
35

kinobi-template

Archived in favour of https://github.com/solana-program/create-solana-program
TypeScript
1
star