{"id":18743246,"url":"https://github.com/anthonybudd/wp_cron","last_synced_at":"2025-04-12T21:32:15.061Z","repository":{"id":130731802,"uuid":"118928455","full_name":"anthonybudd/WP_Cron","owner":"anthonybudd","description":"A better API into the WordPress Cron System","archived":false,"fork":false,"pushed_at":"2022-07-28T18:03:16.000Z","size":8,"stargazers_count":17,"open_issues_count":0,"forks_count":4,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-26T15:43:09.531Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anthonybudd.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-25T15:10:18.000Z","updated_at":"2025-02-05T04:25:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"5185e5af-fb05-4dad-acb8-8ab1af71cd59","html_url":"https://github.com/anthonybudd/WP_Cron","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonybudd%2FWP_Cron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonybudd%2FWP_Cron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonybudd%2FWP_Cron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonybudd%2FWP_Cron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anthonybudd","download_url":"https://codeload.github.com/anthonybudd/WP_Cron/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248635740,"owners_count":21137294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T16:10:45.559Z","updated_at":"2025-04-12T21:32:15.056Z","avatar_url":"https://github.com/anthonybudd.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WP_Cron\n\n\n### Clean API into WordPress's Cron System\nWP_Cron is a simple and easy to use class for defining cron events in WordPress. Simply, define a class extending WP_Cron, set the frequency of the cron event using the $every property and then write the code you want to execute in the handle() method.\n\n\n```php\n\u003c?php\n\nClass UpdateLondonWeather extends WP_Cron{\n\n    public $every = [\n        'seconds'   =\u003e 30,\n        'minutes'   =\u003e 15,\n        'hours'     =\u003e 1,\n    ];\n    \n    public function handle(){\n        $response = file_get_contents('http://api.openweathermap.org/data/2.5/weather?id=2172797');\n        $json     = json_decode($response);\n        if($json === NULL \u0026\u0026 json_last_error() !== JSON_ERROR_NONE){\n            return;\n        }\n        if(isset($json-\u003eweather[0]-\u003edescription)){\n            update_option('london_weather', $json-\u003eweather[0]-\u003edescription);\n        }\n    }\n}\n\nUpdateLondonWeather::register();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonybudd%2Fwp_cron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanthonybudd%2Fwp_cron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonybudd%2Fwp_cron/lists"}