Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
aports
aports
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 650
    • Issues 650
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 208
    • Merge Requests 208
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • alpine
  • aportsaports
  • Issues
  • #436

Closed
Open
Opened Sep 27, 2010 by Luke Stuart@lstuart
  • Report abuse
  • New issue
Report abuse New issue

Cron removes crontab after editting

After editting /etc/crontab/root with crontab -e, the crontab for root is deleted. This appears to take place when any of the default periodic jobs are executed. It does not appear to happen if the crontab never editted.

Test: I added a line to the root crontab to execute a script every 10 minutes. The script simply writes a line to stdout.
The line I added to crontab looks like this: /10 * * * /root/crontest
I used the crontab -e command to edit the crontab. After writing away the change, a file called ‘cron.update’ appears in /etc/crontabs/, containing a single line: root

Cron executes my job without issues until the first of the default periodic jobs is executed. At this point it removes both the ‘update.cron’ file and the root crontab completely. A backup of the crontab is kept in /var/spool/cron/cron.root.*

The above example is not completely reliable for the reason that the removal of the crontab does not necessarily occur on the execution of the first subsequent periodic job, but definitely at some point thereafter.

As I mentioned, if the crontab is never editted, this doesnt happen.

(from redmine: issue id 436, created on 2010-09-27, closed on 2011-03-24)

  • Changesets:
    • Revision 8ee00785 by Timo Teräs on 2011-01-06T06:27:18Z:
main/busybox: fix disappearing crontabs bug

It's uninitialized memory use bug. The relevant parts are rewritten
in busybox-1.18.x and later, so this patch applies only to the
busybox-1.17.x versions. Fixes #436.
  • Revision 1677b385 by Timo Teräs on 2011-01-06T06:54:59Z:
main/busybox: fix disappearing crontabs bug

It's uninitialized memory use bug. The relevant parts are rewritten
in busybox-1.18.x and later, so this patch applies only to the
busybox-1.17.x versions. Fixes #436.
(cherry picked from commit 8ee0078586a14008b9915450dbc719051ed7d3d0)
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
2
Labels
Normal type:bug
Assign labels
  • View project labels
Reference: alpine/aports#436