cron script problem

  • My NAS is H24 active.


    I have created a SCRIPT at the end it should send emails, and write to log.


    I have added it in OMV> Scheduled Jobs >
    I have an entry ./root/scriptname.sh (the script is in /root/scriptname.sh)
    It is scheduled Daily


    If I run it with start button It work I get Email and the entry in syslog and it is executed.
    But it never start daily.

  • I have an entry ./root/scriptname.sh (the script is in /root/scriptname.sh)

    First of all I would try a different directory for script storage. I am not sure If the daily cron job can access a root directory. The admin user may have root rights. Therefore you can start the job from the WebUI successfully.
    Another reason could be your extension '.sh'. Some scripts are only executed it they have no extension.


    For testing purpose you could change the execution intervall to hourly or to a certain point of time.

    OMV 3.0.100 (Gray style)

    ASRock Rack C2550D4I C0-stepping - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1) - Fractal Design Node 304 -

    3x WD80EMAZ Snapraid / MergerFS-pool via eSATA - 4-Bay ICYCube MB561U3S-4S with fan-mod

  • First of all I would try a different directory for script storage. I am not sure If the daily cron job can access a root directory. The admin user may have root rights. Therefore you can start the job from the WebUI successfully.Another reason could be your extension '.sh'. Some scripts are only executed it they have no extension.


    For testing purpose you could change the execution intervall to hourly or to a certain point of time.

    Ok I'll try your suggestions. News ASAP.

  • 1) keep Daily and changed dir script->KO
    2) add a new script every day at specific time leaving script in /root/scriptname.sh ->ok (I cross my figer)



    What are the difference between Daily (with no time chose possibility) and setting every day??

  • Anacreon would take care of that with the next start.

    For some reasons this doesn´t work in OMV(3) (My experience). There was a anacron plugin availabe for OMV2, which was ported to OMV3 by @ryecoaaron and is still available in the testing repo.


    I have solved it by putting the script in /etc/cron.daily, /etc/cron.weekly a.s.o. In my experience the scripts then are executed with the next start after a certain delay.


    I have never tested the ported Anacron plugin because I have a working solution. Maybe I / someone should do this yet?

    OMV 3.0.100 (Gray style)

    ASRock Rack C2550D4I C0-stepping - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1) - Fractal Design Node 304 -

    3x WD80EMAZ Snapraid / MergerFS-pool via eSATA - 4-Bay ICYCube MB561U3S-4S with fan-mod

    • Offizieller Beitrag

    There was a anacron plugin availabe for OMV2, which was ported to OMV3 by @ryecoaaron and is still available in the testing repo.

    I wrote the plugin and it went away for a while because the scheduled jobs had similar features. I brought it back because they were cron-based not anacron-based.


    I have solved it by putting the script in /etc/cron.daily, /etc/cron.weekly a.s.o. In my experience the scripts then are executed with the next start after a certain delay.

    If you use scheduled jobs and select daily or weekly, it should do the same thing.

    omv 7.0.5-1 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.11 | compose 7.1.3 | k8s 7.1.0-3 | cputemp 7.0 | mergerfs 7.0.3


    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!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!