Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cron job 'jetpack_v2_heartbeat' not removed after Jetpack is deactivated #30382

Closed
lakellie opened this issue May 1, 2023 · 5 comments · Fixed by #41117
Closed

Cron job 'jetpack_v2_heartbeat' not removed after Jetpack is deactivated #30382

lakellie opened this issue May 1, 2023 · 5 comments · Fixed by #41117
Assignees
Labels
Customer Report Issues or PRs that were reported via Happiness. aka "Happiness Request", or "User Report" [Package] Connection [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] Normal Triaged [Type] Feature Request

Comments

@lakellie
Copy link

lakellie commented May 1, 2023

Impacted plugin

Jetpack

Quick summary

A Jetpack user in the forums has reported that the cron job jetpack_v2_heartbeat is not removed after deactivation: https://wordpress.org/support/topic/wp-cron-jetpack_v2_heartbeat-not-being-removed/

Can y'all confirm whether this needs to be added to the list of things that are removed upon plugin deactivation/deletion (or if it already is included and there's perhaps something else going on here?)

Thanks!

@lakellie lakellie added [Type] Bug When a feature is broken and / or not performing as intended User Report Needs triage Ticket needs to be triaged labels May 1, 2023
@github-actions github-actions bot added [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] High [Status] Priority Review Triggered The guild in charge of triage has been notified of this issue in Slack labels May 1, 2023
@jeherve jeherve added [Pri] Normal and removed [Pri] High Needs triage Ticket needs to be triaged [Status] Priority Review Triggered The guild in charge of triage has been notified of this issue in Slack labels May 1, 2023
@jeherve
Copy link
Member

jeherve commented May 1, 2023

Can y'all confirm whether this needs to be added to the list of things that are removed upon plugin deactivation/deletion (or if it already is included and there's perhaps something else going on here?)

Yes, that's something we could add to the uninstall routine for sure, or / and to the disconnection method:

/**
* Disconnects from the Jetpack servers.
* Forgets all connection details and tells the Jetpack servers to do the same.
*
* @param boolean $disconnect_wpcom Should disconnect_site_wpcom be called.
* @param bool $ignore_connected_plugins Delete the tokens even if there are other connected plugins.
*/
public function disconnect_site( $disconnect_wpcom = true, $ignore_connected_plugins = true ) {

cc @Automattic/jetpack-kernel, who may have more ideas there.

@jeherve
Copy link
Member

jeherve commented May 1, 2023

Somewhat related:

It may be nice to do an audit of what needs to happen when Jetpack is deactivated when other Jetpack plugins are still vs. not, and ensure that we only leave what's necessary based on the situation.

@bjoernzosel
Copy link

I have also 2 cron jobs that I can not delete, although I deinstalled the plugin and cleaned the database:

jetpack_clean_nonces
jetpack_v2_heartbeat

@superbmario
Copy link

superbmario commented Jan 23, 2024

I have the same issue, two cron jobs still active after Jetpack was uninstalled:

jetpack_clean_nonces
jetpack_v2_heartbeat

Update: It looks like they're both present in WooCommerce. e.g. 'jetpack_v2_heartbeat' is identified in woocommerce/vendor/automattic/jetpack-connection/src/class-heartbeat.php file.

Does anyone know it can be safely removed?

@chrisbliss18 chrisbliss18 self-assigned this Jan 30, 2024
@rickmgithub rickmgithub added [Type] Feature Request Triaged and removed [Type] Bug When a feature is broken and / or not performing as intended labels Feb 1, 2024
@rickmgithub rickmgithub moved this from Needs Triage to In Triage in Automattic Prioritization: The One Board ™ Feb 1, 2024
@matticbot matticbot moved this from In Triage to Triaged in Automattic Prioritization: The One Board ™ Feb 1, 2024
@jeherve jeherve added Customer Report Issues or PRs that were reported via Happiness. aka "Happiness Request", or "User Report" and removed User Report labels Dec 18, 2024
@zaerl
Copy link
Contributor

zaerl commented Jan 15, 2025

I will take care of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer Report Issues or PRs that were reported via Happiness. aka "Happiness Request", or "User Report" [Package] Connection [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] Normal Triaged [Type] Feature Request
Development

Successfully merging a pull request may close this issue.

7 participants