Skip to content

Conversation

@nightnei
Copy link
Contributor

@nightnei nightnei commented Jan 30, 2026

Fixes DOTCOM-15893

Proposed Changes

I added cronstrue lib to render human-readable cron times.
Also added description to be explicit that the specific time of execution is randomized.

Why are these changes being made?

While creating new cron - we send "Daily' etc, but backend stores it as raw cron format. After discussion with implementors of the API - it seems that we had to try to do our best to make UI good with the state of things which we have right now.
The discussion - p9o2xV-5WN-p2#comment-12339
I was thinkign about what we can do and I propose to go with the first step as:

  1. Explicitly add description to the creation form (UI can be improved later) that the time is randomized
  2. Render human-readable information about raw cron times
    See screenshots below.

As the second step, I am going to continue the conversation (p9o2xV-5WN-p2#comment-12339) and try to convince teh team that it will be more rational if they store the requested format at teh server, alongside the command and raw cron time. Hopefully that they will agree and we will make UI much more better. But ATM, what I proposed, I suppose is teh best option, what we can do.

Testing Instructions

  1. Create Atomic Site
  2. Open site "Setting" tab -> "Cron" -> "Add scheduled cron"
  3. Assert that you see additional description
    Screenshot 2026-01-30 at 17 11 30
  4. Add new cron job
  5. Assert that you see raw cron tiem and also human-readable description
    Screenshot 2026-01-30 at 17 12 51

@nightnei nightnei self-assigned this Jan 30, 2026
@nightnei nightnei requested a review from a team as a code owner January 30, 2026 16:52
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jan 30, 2026
@nightnei nightnei force-pushed the improveUiForRenderingScheduledCrons branch from 2273fbc to 984622a Compare January 30, 2026 16:58
@matticbot
Copy link
Contributor

matticbot commented Jan 30, 2026

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • agents-manager
  • help-center
  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug improveUiForRenderingScheduledCrons on your sandbox.

@nightnei nightnei force-pushed the improveUiForRenderingScheduledCrons branch from 984622a to bf6139a Compare January 30, 2026 17:03
@nightnei nightnei requested review from a team as code owners January 30, 2026 17:03
@nightnei nightnei force-pushed the improveUiForRenderingScheduledCrons branch from bf6139a to 427b217 Compare January 30, 2026 17:04
@sirbrillig sirbrillig removed the request for review from a team January 30, 2026 17:10
@nightnei nightnei requested review from katinthehatsite and removed request for a team January 30, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants