{"id":27166154,"url":"https://github.com/shricodev/insta-cron-post-automation","last_synced_at":"2025-07-27T02:39:37.645Z","repository":{"id":250323828,"uuid":"776408135","full_name":"shricodev/insta-cron-post-automation","owner":"shricodev","description":"Python automation to post on Instagram with Cronjob on Unix systems (Linux, Mac, etc). 🐍","archived":false,"fork":false,"pushed_at":"2024-08-09T17:18:31.000Z","size":40,"stargazers_count":18,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-09T03:38:18.506Z","etag":null,"topics":["cronjob","cronjob-scheduler","instagrapi","linux","python3","showcase"],"latest_commit_sha":null,"homepage":"","language":"Python","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/shricodev.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-23T12:28:42.000Z","updated_at":"2025-03-24T17:18:50.000Z","dependencies_parsed_at":"2024-07-26T15:27:09.069Z","dependency_job_id":"5b7d0bf0-5406-41fc-8c2f-03f9f8f7a1e8","html_url":"https://github.com/shricodev/insta-cron-post-automation","commit_stats":null,"previous_names":["shricodev/insta-cron-post-automation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shricodev/insta-cron-post-automation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shricodev%2Finsta-cron-post-automation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shricodev%2Finsta-cron-post-automation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shricodev%2Finsta-cron-post-automation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shricodev%2Finsta-cron-post-automation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shricodev","download_url":"https://codeload.github.com/shricodev/insta-cron-post-automation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shricodev%2Finsta-cron-post-automation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267289683,"owners_count":24064732,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cronjob","cronjob-scheduler","instagrapi","linux","python3","showcase"],"created_at":"2025-04-09T03:38:23.534Z","updated_at":"2025-07-27T02:39:37.630Z","avatar_url":"https://github.com/shricodev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Insta Cron Post Automation 🐍 ⏰\n\n![Version](https://img.shields.io/badge/version-0.1.0-blue.svg?cacheSeconds=2592000)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](#)\n[![Twitter: shricodev](https://img.shields.io/twitter/follow/shricodev.svg?style=social)](https://twitter.com/shricodev)\n\n![GitHub repo size](https://img.shields.io/github/repo-size/shricodev/insta-cron-post-automation?style=plastic)\n![GitHub language count](https://img.shields.io/github/languages/count/shricodev/insta-cron-post-automation?style=plastic)\n![GitHub top language](https://img.shields.io/github/languages/top/shricodev/insta-cron-post-automation?style=plastic)\n![GitHub last commit](https://img.shields.io/github/last-commit/shricodev/insta-cron-post-automation?color=red\u0026style=plastic)\n\n## 📚 Overview\n\nThe **Python Insta Post Scheduler** is a Python application designed to automate Instagram posts by scheduling them using **Cronjobs**. This project allows you to post image to Instagram with optional metadata and control various post settings per each post.\n\n## 😎 Features\n\n- **Automated Posting**: Schedule Instagram posts using cron jobs.\n- **Flexible Configuration**: Define post details and settings in JSON files.\n- **Custom Logging**: Detailed logging of events and errors.\n- **Environment Variable Management**: Securely manage Instagram credentials using environment variables.\n\n## ⚠️ Limitations\n\nSince this script uses cron jobs, it will only be able to run the scheduled posts if the scheduled system is up and running. Therefore, it is recommended to run this script in cloud environments in a VM or any environment of your choice. ☁️\n\n## 🌳 Project Structure\n\n```plaintext\ninsta-cron-post-automation/\n├── .git/\n├── (gitignored) .venv/\n├── data/\n│   ├── generated_images/\n│   │   ├── .gitkeep\n│   │   ├── (gitignored) sample_image_0.jpg\n│   │   └── ...\n│   ├── scheduled_posts/\n│   │   ├── .gitkeep\n│   │   ├── (gitignored) insta_post_1cogp9_2024-07-24-11-42.json\n│   │   └── ...\n│   ├── error.json\n│   ├── success.json\n│   └── to-post.json\n├── logs/\n│   ├── .gitkeep\n│   └── (gitignored) post-activity.log\n│   └── (gitignored) shell-error.log\n├── src/\n│   ├── (gitignored) __pycache__/\n│   ├── scripts/\n│   │   ├── run_media_post.fish\n│   │   └── run_media_post.sh\n│   ├── logger_config.py\n│   ├── media_post.py\n│   ├── populate_sample_posts.py\n│   ├── post.py\n│   ├── post_list.py\n│   └── setup.py\n├── (gitignored) .env\n├── .env.example\n├── .gitignore\n├── main.py\n├── README.md\n└── requirements.json\n```\n\n## 🛠️ Installation\n\n- **Clone the Repository**\n\n\u003e 💬 If you are using HTTPS protocol instead of SSH, change the `git clone` command accordingly.\n\n```bash\ngit clone git@github.com:shricodev/insta-cron-post-automation.git\ncd insta-cron-post-automation\n```\n\n- **Create and Activate Virtual Environment**\n\n```bash\npython3 -m venv .venv\nsource .venv/bin/activate.fish # or .venv/bin/activate if you are not using the fish shell\n```\n\n- **Install Dependencies**\n\n```bash\npip3 install -r requirements.json\n```\n\n- **Set Up Environment Variables**\n\n```bash\nINSTA_USERNAME=\u003cyour_instagram_username\u003e\nINSTA_PASSWORD=\u003cyour_instagram_password\u003e\n```\n\nYou can use the `.env.example` file as a template.\n\n## 💻 Usage\n\n- **Configure Posts**\n\nEdit the `data/to-post.json` file to include the posts you want to schedule. Ensure each post has the required fields:\n\n```json\n{\n  \"image_path\": \"path/to/image.jpg\",\n  \"description\": \"Post description\",\n  # The post date needs to follow this syntax\n  \"post_date\": \"2024-07-06 08:08\"\n  # Optional\n  \"extra_data\": {\n    \"custom_accessibility_caption\": \"Accessibility caption\",\n    \"like_and_view_counts_disabled\": 0,\n    \"disable_comments\": 0\n  },\n}\n```\n\n- **Schedule Posts**\n\nRun the `main.py` script to schedule your posts:\n\n```bash\npython3 main.py\n```\n\nThis script will:\n\n- Load posts from the JSON file.\n- Creates an individual json file for each post inside the `data/scheduled_posts/` directory.\n- Schedule cron jobs to post at the specified times.\n\n## 💬 Logging\n\nThe application logs detailed information about events and errors. You can view the logs in the `logs/post-activity.log` and `logs/shell-error.log` file.\nAlso, you can view the success and error logs for each post in the `data/success.json` and `data/error.json` files respectively.\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshricodev%2Finsta-cron-post-automation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshricodev%2Finsta-cron-post-automation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshricodev%2Finsta-cron-post-automation/lists"}