{"id":18821197,"url":"https://github.com/compwright/codeigniter-cli-bootstrap","last_synced_at":"2025-04-14T00:26:43.194Z","repository":{"id":5423302,"uuid":"6614959","full_name":"compwright/codeigniter-cli-bootstrap","owner":"compwright","description":"A simple bootstrap file that you can use to directly run your CodeIgniter controllers from the command line and redirect the output to a log file.","archived":false,"fork":false,"pushed_at":"2013-05-04T18:51:23.000Z","size":118,"stargazers_count":34,"open_issues_count":1,"forks_count":15,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-27T14:47:48.233Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/compwright.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-11-09T14:54:02.000Z","updated_at":"2023-01-30T16:13:02.000Z","dependencies_parsed_at":"2022-07-06T17:02:55.986Z","dependency_job_id":null,"html_url":"https://github.com/compwright/codeigniter-cli-bootstrap","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/compwright%2Fcodeigniter-cli-bootstrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Fcodeigniter-cli-bootstrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Fcodeigniter-cli-bootstrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Fcodeigniter-cli-bootstrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compwright","download_url":"https://codeload.github.com/compwright/codeigniter-cli-bootstrap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248800113,"owners_count":21163404,"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-08T00:35:53.397Z","updated_at":"2025-04-14T00:26:43.185Z","avatar_url":"https://github.com/compwright.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"codeigniter-cli-bootstrap\n=========================\n\nFormerly: **Cron Bootstrapper**\n\nA simple bootstrap file that you can use to directly run your CodeIgniter controllers from the command line\nand redirect the output to a log file.\n\nFeatures\n--------\n\n* Easy to use\n* No core framework hacking\n* Bootstrap file exists independently of your application\n* Supports runtime limit\n* Log the results of each run\n* Run directly without the PHP command (on UNIX systems only)\n\nInstallation\n------------\n\n1. Copy the code at the bottom of this code and save it in a file called **cron.php** somewhere outside the\n   document root.\n\n2. Set the `CRON_CI_INDEX` constant to the full absolute file/path of your CodeIgniter `index.php` file\n\n3. Make this file directly executable:\n\n```sh\nchmod a+x cron.php\n```\n\nUsage\n-----\n\nYou can use this file to call any controller function:\n```php\n./cron.php --run=/controller/method [--show-output] [--log-file=logfile] [--time-limit=N] [--server=http_server_name]\n```\n\nOptions\n-------\n\n### `--run=/controller/method`\n(Required) The controller and method you want to run.\n\n### `--show-output`\n(Optional) Display CodeIgniter's output on the console (default: don't display)\n\n### `--log-file=logfile`\n(Optional) Log the date/time this was run, along with CodeIgniter's output\n\n### `--time-limit=N`\n(Optional) Stop running after N seconds (default=0, no time limit)\n\n### `--server=http_server_name`\n(Optional) Set the `$_SERVER['SERVER_NAME']` system variable (useful if your application needs to know what the\nserver name is)\n\nTroubleshooting\n---------------\n\n### `Invalid interpreter: /usr/bin/php^M` error when running cron.php:\n\nThis is caused by not having UNIX-style line breaks, which usually happens by copying files created\non other operating systems. Use this command to convert the line breaks to UNIX format:\n\n```sh\nmv cron.php cron.old\ntr -d '\\15\\32' \u003c cron.old \u003e cron.php\nrm cron.old\n```\n\n### Fatal error in cron.php around line 111:\n\n```php\nrequire(CRON_CI_INDEX); // Main CI index.php file\n```\n\nCheck that you have correctly defined the path to your application's main **index.php** defined correctly:\n\n```php\ndefine('CRON_CI_INDEX', '/var/www/vhosts/htdocs/index.php'); // Your CodeIgniter main index.php file\n```\n\n### No errors or output and the script doesn't seem to run:\n\nMake sure PHP error logging is turned on that your PHP error log is writable.\n\nCode that depends on sessions may cause this. Use some conditional logic to see if the `CRON` constant\nis defined before auto-loading any authentication libraries.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompwright%2Fcodeigniter-cli-bootstrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompwright%2Fcodeigniter-cli-bootstrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompwright%2Fcodeigniter-cli-bootstrap/lists"}