Cannot change user crontab

  • I need to change an user crontab so I tried to change with the command

    Quote

    crontab -e

    from the user shell but the result was not the expected because the cron job did not change remaining the same as before.

    I tried to find where this cron job was saved but I did not find.

    What is wrong?

    Thanks for all replies.

    • New
    • Official Post

    OMV doesn't use crontab. crontab -e is the proper way to edit a user's crontab. If you want to edit it as root, you can: crontab -u username -e

    omv 7.7.10-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.2 | kvm 7.1.8 | compose 7.6.10 | cterm 7.8.7 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.3.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • OMV doesn't use crontab. crontab -e is the proper way to edit a user's crontab. If you want to edit it as root, you can: crontab -u username -e

    So what is the best way to remove the old crontab I cannot find?


    --

    Openmediavault 7.7.9-1 | 64 bit | 6.12.27+bpo-amd64

    • New
    • Official Post

    So what is the best way to remove the old crontab I cannot find?

    How can you not find it? A crontab is not really a file and cannot exist for a user that doesn't exist. Are you sure it isn't in /etc/cron.d/?

    omv 7.7.10-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.2 | kvm 7.1.8 | compose 7.6.10 | cterm 7.8.7 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.3.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • How can you not find it? A crontab is not really a file and cannot exist for a user that doesn't exist. Are you sure it isn't in /etc/cron.d/?

    Yes, I am sure I cannot find the relevant file in any directory related to cron, e.g. /etc/cron.d and other.

    I think that this crontab job as mine it is located somewhere like openmediavault db or something similar.

    Consider that my installation is really old but it is regularly updated to the last stable version.


    P.S.: sorry for the delay of this reply and thanks a lot for your help!


    --

    Openmediavault 7.7.9-1 | 64 bit | 6.12.27+bpo-amd

    • New
    • Official Post

    I think that this crontab job as mine it is located somewhere like openmediavault db or something similar.

    Consider that my installation is really old but it is regularly updated to the last stable version.

    omv only uses cron not crontab. omv writes a cron file at /etc/cron.d/openmediavault-userdefined and it runs omv generated files from the Scheduled Tasks in /var/lib/openmediavault/cron.d/. But it wouldn't write a job that isn't listed in the Scheduled Tasks tab.

    omv 7.7.10-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.2 | kvm 7.1.8 | compose 7.6.10 | cterm 7.8.7 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.3.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Found the problem: the cron job was for a user, not a system job and the user was unable (don't know why) to modifiy that job but using the command crontab -u user -e I managed to change that job!

    Thanks a lot for the help!

  • macom

    Added the Label resolved

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!