@wonsukchoi/crondex 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,31 @@
1
+ id: passport-expiry-check
2
+ version: 1
3
+ name: Passport Expiry Check
4
+ description: >
5
+ Warns you before your passport expires — including the "6 months
6
+ validity required" rule many countries enforce at the border. Use
7
+ this if you've ever booked a trip and only checked your passport
8
+ date after buying the ticket.
9
+ category: travel
10
+ tags: [travel, passport, documents]
11
+ schedule: "0 9 1 * *"
12
+ timezone: "UTC"
13
+ runner: shell
14
+ command: >
15
+ expiry={{passport_expiry_date}}; warn_months={{warn_months}};
16
+ expiry_epoch=$(date -j -f %Y-%m-%d "$expiry" +%s 2>/dev/null || date -d "$expiry" +%s);
17
+ today_epoch=$(date +%s);
18
+ days_left=$(( (expiry_epoch-today_epoch)/86400 ));
19
+ warn_days=$(( warn_months * 30 ));
20
+ if [ "$days_left" -le 0 ]; then echo "EXPIRED: passport expired on $expiry — renew immediately."; exit 1;
21
+ elif [ "$days_left" -le "$warn_days" ]; then echo "WARNING: passport expires in $days_left day(s) ($expiry) — many countries require ${warn_months} month(s) of remaining validity to enter."; exit 1;
22
+ else echo "OK: passport valid, $days_left day(s) until expiry ($expiry)."; fi
23
+ variables:
24
+ passport_expiry_date:
25
+ default: "2030-01-01"
26
+ description: Date (YYYY-MM-DD) your passport expires.
27
+ warn_months:
28
+ default: 6
29
+ description: Start warning this many months before expiry (6 is the common border-entry rule).
30
+ compatible_agents: [generic, claude, codex]
31
+ notes: Zero-token. Update passport_expiry_date after renewal.
@@ -0,0 +1,32 @@
1
+ id: visa-expiry-check
2
+ version: 1
3
+ name: Visa/Residency Document Expiry Check
4
+ description: >
5
+ Warns you before a visa, residency permit, or similar document
6
+ expires. Use this if you're living or working abroad and a document
7
+ deadline has ever crept up on you.
8
+ category: travel
9
+ tags: [travel, visa, documents]
10
+ schedule: "0 9 1 * *"
11
+ timezone: "UTC"
12
+ runner: shell
13
+ command: >
14
+ name="{{doc_name}}"; expiry={{expiry_date}}; warn={{warn_days}};
15
+ expiry_epoch=$(date -j -f %Y-%m-%d "$expiry" +%s 2>/dev/null || date -d "$expiry" +%s);
16
+ today_epoch=$(date +%s);
17
+ days_left=$(( (expiry_epoch-today_epoch)/86400 ));
18
+ if [ "$days_left" -le 0 ]; then echo "EXPIRED: $name expired on $expiry."; exit 1;
19
+ elif [ "$days_left" -le "$warn" ]; then echo "WARNING: $name expires in $days_left day(s) ($expiry)."; exit 1;
20
+ else echo "OK: $name valid, $days_left day(s) until expiry."; fi
21
+ variables:
22
+ doc_name:
23
+ default: "visa"
24
+ description: What document this is (visa, residency permit, work permit, etc).
25
+ expiry_date:
26
+ default: "2027-01-01"
27
+ description: Date (YYYY-MM-DD) the document expires.
28
+ warn_days:
29
+ default: 30
30
+ description: Start warning this many days before expiry.
31
+ compatible_agents: [generic, claude, codex]
32
+ notes: Zero-token. One job per document — copy it and adjust for each document you're tracking.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wonsukchoi/crondex",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "A public directory of pre-made, agent-editable cron jobs.",
5
5
  "type": "module",
6
6
  "license": "MIT",