• Starting cron as root automatically at boot?


    I wish I could tell you how to do it.

    I’ve been confusing myself reading articles about systemd and OpenRC and cron. I’m all confused and my brain is spent.

    I want to run “sudo cron start” when I start my system. Alternatively, just start cron as root. Cron changes my gnome wallpaper regularly. I don’t want to be a lazy Help Vampire, but can someone point me in the right direction or just tell me how to do what I want?

  • @shwaybotx a bad way to use the sudo without typing the password to a command is make a script with:
    echo YOUR_PASSWORD | sudo YOUR_COMMAND
    That way, the sudo will read the echoed password…

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • It seems there isn’t a startup app under Gnome, then you’ll need to add a .desktop file in autostart folder.

    i made you a simple example HERE (i just copied some .desktop file and edited it, maybe you’ll need to set terminal to “true”)

    Don’t forget to make both script .sh and .desktop executables files with:
    chmod + x script_name

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • sudo pacman -S cronie
    sudo systemctl enable cronie.service
    

    [updates once a week] = [90% less problems]
    [Li{u}n//u//{i}x] since 1988 - overcoming failure means success
    http://kamprad.net/howto-installing-antergos/
    https://forum.antergos.com/topic/1883/how-to-include-system-logs-when-asking-for-help

  • @joekamprad said in Starting cron as root automatically at boot?:

    sudo pacman -S cronie
    sudo systemctl enable cronie.service

    It came to a big surprise to me that the venerable cron does not come standard with Antergos, but @joekamprad presented here the only solid approach for installing cron and then enabling it as a system service.

  • @joekamprad I checked here i have it installed already, so is cronie a cron for systemd?

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • Not installed on my 2-day old system (Gnome Shell desktop). You are using mate, though: it may have been installed automatically with the mate desktop. cronie is the package name in Antergos containing cron. Cron is started, as any other system service, using systemd.

starting5 root9 automatically6 cron4 Posts 7Views 285
Log in to reply