question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Cron schedule not respected & updater being run multiple times in one go

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

Version

2.9.2

Describe The Bug

I’ve changed the cron environment variable so that the updater runs every 24 hours instead of the default, however, this setting isn’t being respected (despite saying that it has been set within the logs) with the updater still being run at every 5th minute. Additionally, the cron job runs the updater task multiple times (at once) for some reason. Checking the logs, I can see this has been happening since I created the container (before even changing the cron variable).

I’m running the latest version within Docker on a Synology NAS.

Steps To Reproduce

  1. Create a container for this image on a Synology NAS.
  2. Change the CRON environment variable from the default to “0 0 * * *”.

Expected Behavior

The updater task is ran only once every 24 hours (or whatever the user inputs for the CRON variable).

YAML Configuration

No response

JS Configuration

No response

Relevant Output Log

2022-09-20T15:42:31	[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
2022-09-20T15:42:31	[s6-init] ensuring user provided files have correct perms...exited 0.
2022-09-20T15:42:31	[fix-attrs.d] applying ownership & permissions fixes...
2022-09-20T15:42:31	[fix-attrs.d] done.
2022-09-20T15:42:31	[cont-init.d] executing container initialization scripts...
2022-09-20T15:42:31	[cont-init.d] 10-adduser: executing... 
2022-09-20T15:42:31	usermod: no changes
2022-09-20T15:42:31	Initializing container
2022-09-20T15:42:31	User uid: 1030
2022-09-20T15:42:31	User gid: 100
2022-09-20T15:42:31	[cont-init.d] 10-adduser: exited 0.
2022-09-20T15:42:31	[cont-init.d] 11-cron: executing... 
2022-09-20T15:42:31	Setting crontab to 0 0 * * *
2022-09-20T15:42:31	[cont-init.d] 11-cron: exited 0.
2022-09-20T15:42:31	[cont-init.d] done.
2022-09-20T15:42:31	[services.d] starting services
2022-09-20T15:42:31	[services.d] done.
2022-09-20T15:42:32	[info] Cloudflare DDNS start
2022-09-20T15:42:33	[info] Skipped creating.
2022-09-20T15:42:33	[info] Updated * with 0:0:0:0:0:0:0:0
2022-09-20T15:42:33	[info] Skipped updating.
2022-09-20T15:42:33	[info] Updated mydomain.com with 1.2.3.4
2022-09-20T15:42:33	[info] Skipped creating.
2022-09-20T15:42:33	[info] Updated * with 1.2.3.4
2022-09-20T15:42:33	[info] Skipped updating.
2022-09-20T15:42:33	[info] Updated mydomain.com with 0:0:0:0:0:0:0:0
2022-09-20T15:42:33	[info] Cloudflare DDNS end
2022-09-20T15:42:33	crond[240]: crond (busybox 1.34.1) started, log level 8
2022-09-20T15:45:00	crond[240]: USER root pid 242 cmd run-parts /etc/periodic/15min
2022-09-20T15:45:00	crond[240]: USER root pid 243 cmd /app/cloudflare.sh
2022-09-20T15:45:00	crond[240]: USER root pid 244 cmd /app/cloudflare.sh
2022-09-20T15:45:00	crond[240]: USER root pid 245 cmd /app/cloudflare.sh
2022-09-20T15:45:00	crond[240]: USER root pid 256 cmd /app/cloudflare.sh
2022-09-20T15:45:00	crond[240]: USER root pid 257 cmd /app/cloudflare.sh
2022-09-20T15:45:01	[info] Cloudflare DDNS start
2022-09-20T15:45:01	[info] Cloudflare DDNS start
2022-09-20T15:45:01	[info] Cloudflare DDNS start
2022-09-20T15:45:01	[info] Cloudflare DDNS start
2022-09-20T15:45:01	[info] Cloudflare DDNS start
2022-09-20T15:45:04	[info] Skipped creating.
2022-09-20T15:45:04	[info] Updated * with 1.2.3.4
2022-09-20T15:45:05	[info] Skipped creating.
2022-09-20T15:45:05	[info] Updated * with 0:0:0:0:0:0:0:0
2022-09-20T15:45:05	[info] Skipped creating.
2022-09-20T15:45:05	[info] Updated * with 0:0:0:0:0:0:0:0
2022-09-20T15:45:05	[info] Skipped creating.
2022-09-20T15:45:05	[info] Updated * with 1.2.3.4
2022-09-20T15:45:05	[info] Skipped updating.
2022-09-20T15:45:05	[info] Updated mydomain.com with 1.2.3.4
2022-09-20T15:45:05	[info] Skipped creating.
2022-09-20T15:45:05	[info] Updated * with 0:0:0:0:0:0:0:0
2022-09-20T15:45:05	[info] Skipped updating.
2022-09-20T15:45:05	[info] Updated mydomain.com with 0:0:0:0:0:0:0:0
2022-09-20T15:45:05	[info] Skipped updating.
2022-09-20T15:45:05	[info] Updated mydomain.com with 0:0:0:0:0:0:0:0
2022-09-20T15:45:06	[info] Skipped creating.
2022-09-20T15:45:06	[info] Updated * with 0:0:0:0:0:0:0:0
2022-09-20T15:45:06	[info] Skipped updating.
2022-09-20T15:45:06	[info] Updated mydomain.com with 0:0:0:0:0:0:0:0
2022-09-20T15:45:06	[info] Skipped creating.
2022-09-20T15:45:06	[info] Updated * with 1.2.3.4
2022-09-20T15:45:06	[info] Skipped creating.
2022-09-20T15:45:06	[info] Updated * with 1.2.3.4
2022-09-20T15:45:06	[info] Skipped creating.
2022-09-20T15:45:06	[info] Updated * with 1.2.3.4
2022-09-20T15:45:06	[info] Skipped updating.
2022-09-20T15:45:06	[info] Updated mydomain.com with 1.2.3.4
2022-09-20T15:45:06	[info] Cloudflare DDNS end
2022-09-20T15:45:06	[info] Skipped updating.
2022-09-20T15:45:06	[info] Updated mydomain.com with 1.2.3.4
2022-09-20T15:45:06	[info] Skipped updating.
2022-09-20T15:45:06	[info] Updated mydomain.com with 0:0:0:0:0:0:0:0
2022-09-20T15:45:06	[info] Skipped creating.
2022-09-20T15:45:06	[info] Updated * with 0:0:0:0:0:0:0:0
2022-09-20T15:45:06	[info] Cloudflare DDNS end
2022-09-20T15:45:07	[info] Skipped updating.
2022-09-20T15:45:07	[info] Updated mydomain.com with 1.2.3.4
2022-09-20T15:45:07	[info] Cloudflare DDNS end
2022-09-20T15:45:07	[info] Skipped updating.
2022-09-20T15:45:07	[info] Updated mydomain.com with 0:0:0:0:0:0:0:0
2022-09-20T15:45:07	[info] Cloudflare DDNS end
2022-09-20T15:45:07	[info] Skipped updating.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
joshuaavaloncommented, Sep 29, 2022

OK, I will take a look at this weekend.

0reactions
joshuaavaloncommented, Oct 22, 2022

🎉 This issue has been resolved in version 2.9.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cron job troubleshooting guide - Cronitor
What to do if your cron job doesn't run when expected · Validate your job schedule. Once you have found your job, verify...
Read more >
Bug Report: Function with crontab runs multiple times #3102
Currently this can be solved by manually entering Redis database and removing schedules, so you only have one in there. All reactions.
Read more >
Why is this cron entry executed twice? - Stack Overflow
Nothing in the description gives reason for it to be executed twice. Look elsewhere. Do two users call it? Is it entered twice?...
Read more >
Cron bug - crontab.guru
While testing some scheduling edge cases, I discovered an old bug in cron. TL;DR: As long as your crontab schedules' day-of-month and day-of-week...
Read more >
Cron Jobs: A Comprehensive Guide - SitePoint
Learn what cron is and how to use it. This guide covers the basics of cron jobs, as well as some more advanced...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found