Sync error stopping other processes (including Obsidian Cron)

Before opening a new bug report, please search the forum for duplicates and follow the Troubleshooting Guide.

  • Developer issues with the API should go here
  • Themes and Custom CSS issues should go here
  • Translations issues/improvements should be posted here
  • Obsidian Clipper Bugs should be posted here
  • Obsidian Importer Bugs should be posted here
  • We only accept bug reports that are reproducible with the installation methods we provide on our website. If you obtained Obsidian elsewhere, you MUST reproduce the problem with one of the officially supported installation methods. (No ARCH, NixOS, homebrew, chocolatey, third party packages).

Once you’ve done the above, delete everything above this line.

Steps to reproduce

  1. Start sync
  2. Add in the Cron plugin and create a .py or other script that you want to run periodically
  3. Disconnect the internet so that sync fails
  4. See that your Cron-triggered scripts no longer run when they are supposed to
  5. Restart Obsidian. See that Cron scripts run again

Did you follow the troubleshooting guide? [Y/N]

Please, follow the Troubleshooting Guide before answering Yes.

Expected result

A sync failure does not cause Cron and other scripts from running

Actual result

If Sync fails (because of a network timeout or other hiccup), it apparently hangs and prevents other processes (like Cron and scripts) from running

Environment

SYSTEM INFO:
Obsidian version: 1.12.7
Installer version: 1.7.5
Operating system: Windows 11 Pro 10.0.26200
Login status: logged in
Language: en
Catalyst license: none
Insider build toggle: off
Live preview: off
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 9
Plugins enabled: 7
1: Templater v2.14.1
2: Commander v0.5.4
3: Editing Toolbar v3.1.18
4: QuickAdd v2.1.0
5: Cron v1.1.2
6: On This Day Expanded v2.0.3-fork
7: Meta Bind v1.4.6
RECOMMENDATIONS:
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.


Additional information

I have several scripts that are kicked off each day by the Cron plug-in. They check for to-dos that need nudging, etc. When there is a sync issue because of a network hiccup, sync silently fails, and then I find out several days later my scripts haven’t run. When I restart Obsidian, everything is fine again.

Did you try to update the installer ?
I mean, I don’t know if it’ll change anything but maybe it could help ? :woman_shrugging:

This seems like something you should take up with the Obsidian Cron dev on their issues page, but we’ll see what the team thinks.


Obsidian cron has the ability to hook into the native Obsidian Sync plugin. When enabled all locks, cron runs & commands will wait for Obsidian Sync to be fully completed before running any cron jobs.

https://github.com/cdloh/obsidian-cron#sync

Thanks. That setting was enabled, so I disabled it. We’ll see if that solves the issue. Still seems to be a problem that either Sync is leaving locks or other resources in use after failing, or Cron is not detecting them correctly