π Twice-Daily Auto-Post Schedule
π Twice-Daily Auto-Post Schedule
This guide sets up automated research news posting twice per day to your blog.
β° Schedule Options
Option A: Windows Task Scheduler (Local)
Run the Python script automatically every 12 hours on your Windows machine.
Setup Steps:
- Open Task Scheduler:
- Press
Win + Rβ typetaskschd.mscβ Press Enter
- Press
- Create New Task:
- Right-click Task Scheduler Library β Create Task
- Name:
Research News Auto-Post - Check: β Run with highest privileges
Set Triggers (2 triggers for twice daily):
Trigger 1 (Morning):
- Event: Begin a task
- Type: On a schedule
- Frequency: Daily
- Start time: 9:00 AM
- Repeat every: 1 day
Trigger 2 (Evening):
- Event: Begin a task
- Type: On a schedule
- Frequency: Daily
- Start time: 9:00 PM
- Repeat every: 1 day
- Set Action:
- Program:
C:\Users\saifa\AppData\Local\Programs\Python\Python313\python.exe - Arguments:
.github/scripts/fetch_research_news.py - Start in:
C:\Users\saifa\SaifaldeenALKADHIM.github.io
- Program:
- Set Conditions:
- β Wake computer to run task
- β Run only if user is logged in
Option B: GitHub Actions (Cloud - After Token Update)
Once your token has workflow scope, use twice-daily cron schedule:
on:
schedule:
# 9 AM UTC (Morning)
- cron: '0 9 * * *'
# 9 PM UTC (Evening)
- cron: '0 21 * * *'
This runs automatically without your computer being on.
π What Happens Each Run
Per Each Execution:
- β Fetches 7 real arXiv papers
- β Creates blog posts with authors and abstracts
- β Auto-commits to git
- β Pushes to GitHub
- β GitHub Pages rebuilds
Per Day:
- π Morning (9 AM): 7 posts
- π Evening (9 PM): 7 posts
- Total: 14 new research posts daily!
π§ Manual Trigger (Anytime)
Run immediately anytime:
cd C:\Users\saifa\SaifaldeenALKADHIM.github.io
python .github/scripts/fetch_research_news.py
π± Monitor Progress
- Check local folder:
Get-ChildItem _posts/ | Sort-Object -Property LastWriteTime -Descending | Select-Object -First 5 - Check blog updates:
- Visit: https://SaifaldeenALKADHIM.github.io/year-archive/
- Refresh every 5 minutes for latest posts
- Check git commits:
git log --oneline | Select-Object -First 10
βοΈ Configuration
Change Post Count Per Run
Edit .github/scripts/fetch_research_news.py:
for paper in papers[:7]: # Change 7 to your desired number
Change Schedule Times
Windows Task Scheduler:
- Modify the triggersβ start times (currently 9 AM & 9 PM)
GitHub Actions (after token update):
- Edit
.github/workflows/auto-post-research-news.yml - Change cron times: ```yaml
- cron: β0 8 * * *β # 8 AM UTC
- cron: β0 20 * * *β # 8 PM UTC ```
Timezone Conversion
Current schedule (UTC):
- π 9 AM UTC β 10 AM Budapest (CET)
- π 9 PM UTC β 10 PM Budapest (CET)
Other timezones:
- πΊπΈ EST: 4 AM & 4 PM
- πΊπΈ PST: 1 AM & 1 PM
- πͺπΊ CET: 10 AM & 10 PM
π Expected Output
After 7 days with twice-daily posting:
- π 98 new blog posts (14 per day Γ 7 days)
- π Constantly updated research blog
- π Real-time AI & sensor technology tracking
- π± Fresh content for SEO & engagement
β οΈ Troubleshooting
| Issue | Solution |
|---|---|
| Posts not appearing | Check GitHub Pages rebuild (1-2 min) |
| Git push fails | Verify token has push permissions |
| Duplicate posts | Check check_post_exists() logic |
| Task Scheduler not running | Check Windows Event Viewer logs |
| No posts created | Verify arXiv API connectivity |
π― Next Steps
Immediate (Local):
- Set up Windows Task Scheduler (Option A)
- Test morning run manually
- Verify posts appear on blog
Future (Cloud - Recommended):
- Update GitHub token with
workflowscope - Push
.github/workflows/auto-post-research-news.yml - Let GitHub Actions handle the automation
Status: Ready for twice-daily posting! π
Current Setup: Manual + Windows Task Scheduler option available
