EmDash Content Scheduling: Automate Without Plugin Bloat

EmDash's event-driven architecture enables custom automation without plugin bloat or security risks.

By Central
Build a custom scheduler in EmDash using hooks and isolated plugins.
Highlights
  • EmDash's cron hook lets you check for due posts and publish them automatically.
  • Plugins run in isolated V8 isolates with declared capabilities for security.
  • You can create a scheduling plugin that does exactly what you need without bloat.

Most content scheduling systems are just delayed publishing — a calendar with a toggle. EmDash flips that. Its real power isn’t in a built-in scheduler (it doesn’t have one yet). It’s in the event-driven architecture that lets you build custom automation without the security nightmares plugins bring. Think of scheduling not as a date-picker, but as a chain of triggers: “When the time hits, run this hook, in this isolated sandbox, with these exact permissions.” That changes everything about how you plan publications.

What EmDash Offers Out of the Box

EmDash v0.1 ships with drafts, revisions, and a simple publish/unpublish toggle on every post and page. You can set a future date manually — the interface shows a “Publish on” field. But there’s no recurring schedule, no bulk rescheduling, no visual calendar. That’s by design. The team focused on the foundation: content types, hooks, and the plugin sandbox. Scheduling is something you build on top.

The absence of a built-in scheduler isn't a weakness. It's an invitation to build exactly what you need, with security and performance that WordPress plugins can't match.

The key components:

  • Content types – Define your own post types with custom fields. A “scheduled date” field is trivial to add.
  • Hooks – Events like post:publishedcode, post:savedcode, cron:tickcode that plugins can listen to.
  • Dynamic workers – Plugins run in isolated V8 isolates with declared capabilities. No database access unless you allow it.

This means you can create a scheduling plugin that does exactly what you need — and nothing more. No bloated all-in-one plugin with 50 features you’ll never use.

How to Build a Custom Scheduler (Step-by-Step)

1. Create a Content Type for Scheduled Posts

In the admin, go to Content Types → Add New. Name it “Scheduled Post” or reuse the default “Post” type. Add a field called publish_datecode of type “datetime”. That field will store when the post should go live.

2. Set Up a Plugin with a Cron Hook

Create a new plugin file. Define a hook that runs on a regular interval (e.g., every minute). The plugin will check for posts where publish_datecode is in the past and status is “draft”, then publish them.

“`typescript

import { definePlugin } from ’emdash’

export default definePlugin({

id: ‘scheduler’,

version: ‘0.1.0’,

capabilities: [‘read:content’, ‘write:content’],

hooks: {

‘cron:tick’: async ({ context, content }) => {

const now = new Date()

const duePosts = await content.find({

type: ‘post’,

status: ‘draft’,

‘publish_date’: { $lte: now.toISOString() }

})

for (const post of duePosts) {

await content.update(post.id, { status: ‘publish’ })

}

}

}

})

“`

The plugin declares it needs read and write access to content. That’s all. It cannot touch media, users, or the theme. Secure by default.

3. Deploy the Plugin

If you’re on Cloudflare’s paid plan ($5/month), the plugin runs in a dynamic worker — sandboxed, fast, and isolated. On self-hosted Node.js, it runs in-process (no sandbox yet). Either way, the logic is clean and auditable.

4. Schedule Your Posts

Write a post, set the publish_datecode field to a future time, save as draft. The cron hook will pick it up within the next interval.

EmDash Scheduling vs WordPress Scheduling: A Comparison

Feature WordPress (with plugin) EmDash (custom plugin)
Security model Plugin has full DB access; one vulnerability exposes all data Plugin runs in sandbox with scoped permissions; cannot access database unless declared
Customization Limited to plugin’s UI; often need multiple plugins Full control via code; you define the exact behavior
Recurring schedules Requires another plugin or custom code Built into your plugin logic — any interval, any condition
Performance PHP+MySQL, shared hosting bottlenecks Serverless V8 isolates, scales to zero, spins up in milliseconds
Developer effort Install, configure, hope updates don’t break Write ~30 lines of TypeScript, deploy, maintain in version control

The tradeoff is clear: WordPress scheduling is easier to start, but EmDash scheduling is safer, faster, and more flexible once you’re comfortable with code.

Real-World Use Case: Automating Newsletter Content

Imagine you publish a weekly newsletter every Friday at 10 AM. In WordPress, you’d need a cron plugin, a post scheduler, and maybe a separate email plugin — each with its own permissions and update cycles. In EmDash, one plugin handles everything: it checks for a custom content type “Newsletter”, publishes the draft if the date matches, and triggers an email hook (with send:emailcode capability). No extra plugins, no security surface area beyond what you explicitly grant.

The same architecture works for:

  • Product launches – Publish a landing page on a specific date, then archive it after the sale ends.
  • Event registrations – Open registration at 9 AM, close at 5 PM, all driven by hooks.
  • Seasonal content – Rotate holiday banners on a schedule, using a sectioncode widget that swaps based on date.

The Limitation You Need to Accept

EmDash is v0.1. The cron hook might not be fully stable yet. The playground doesn’t include it. You’ll need to run your own instance to test. And if you’re not comfortable writing TypeScript, this approach isn’t for you — at least not until a visual scheduler appears in the marketplace.

But that’s the counterintuitive point: the absence of a built-in scheduler isn’t a weakness. It’s an invitation to build exactly what you need, with security and performance that WordPress plugins can’t match. When the ecosystem matures, someone will package this into a one-click install. Until then, you have the foundation.

Questions answered
  • What makes EmDash different from traditional content scheduling?EmDash uses an event-driven architecture with hooks and isolated plugins, not a built-in scheduler.
  • How do you build a custom scheduler in EmDash?Create a content type with a publish_date field, set up a plugin with a cron hook, and deploy it.
  • What are the limitations of EmDash v0.1?The cron hook may not be fully stable, and you need to run your own instance to test.
Share This Article