ML
    • Register
    • Login
    • Search
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. Tags
    3. crontab
    Log in to post
    • All categories
    • DustinB3403

      WSL crontab log location
      IT Discussion • cron crontab wsl • • DustinB3403

      2
      0
      Votes
      2
      Posts
      162
      Views

      DustinB3403

      Never mind, twas a permissions issue.

    • IRJ

      Where am I supposted to add my cronjob?
      IT Discussion • crontab cron cron job • • IRJ

      7
      0
      Votes
      7
      Posts
      212
      Views

      stacksofplates

      If this is a systemd distro, you can just create a timer and service. That way instead of sending a mail message, it's automatically part of the logging for that unit.

      If it's a recent version of systemd, you can have a user based systemd that doesn't need escalated privileges. I just finished setting up borg for backup since I'm on Fedora Silverblue now (couldn't use the old way), and I just set up user based systemd units to do the backup.

    • Obsolesce

      Converting a cron job to a systemd timer
      IT Discussion • systemd timers crontab saltstack • • Obsolesce

      5
      3
      Votes
      5
      Posts
      1089
      Views

      AdamF

      @Obsolesce said in Converting a cron job to a systemd timer:

      First some info as it may have impact on whether or not to do this in the first place:

      I have a SaltStack deployment of 600-ish minions. Currently, I have a highstate set to run every 45 minutes via cron:

      */45 * * * * root /usr/bin/salt -b 25\% '*' state.apply

      I know one of the benefits of systemd over cron is the logging, and I think this would be great to have better logging of when this runs. More can potentially be done with it automatically, like look for issues and send emails just as one easy example.

      But I don't know how to test this... maybe it doesn't produce the kind of log I want, and salt may already do this in it's own log even better. Or maybe this will produce a log that's too big and cause issues later. I can watch it in the beginning either way, so it's fine.

      Can that cron job be converted into a reliable systemd timer? If so, how?

      600ish minions. Wow. Curious about your setup. (Types of systems, types of states, how to manage and review output of all of that, etc.” Maybe an upcoming post? 🙂

    • DustinB3403

      Need some help with crontab
      IT Discussion • crontab centos snipe-it • • DustinB3403

      15
      0
      Votes
      15
      Posts
      938
      Views

      dbeato

      @dustinb3403 said in Need some help with crontab:

      Ok and that is what it was.

      Simply needed to make a bash script out of it and have it scheduled to run, rather than using the commands directly in cron.

      Problem solved.

      Solution:

      pwd /usr/bin/local touch expiring-alert.sh vi expiring-alert.sh /usr/bin/php /var/www/html/snipeit/artisan snipeit:expiring-alerts sudo vi /etc/crontab 35 * * * 1 <user> /usr/local/bin/expiring-alert.sh

      Presumably changing this to be @daily or @weekly would work as well.

      MOst of the time that is how I have it setup on my crontab, same for my certbot scripts too.

    • DustinB3403

      Crontab - Snipe-IT Scheduling
      IT Discussion • crontab noob learning snipe-it • • DustinB3403

      8
      1
      Votes
      8
      Posts
      2046
      Views

      DustinB3403

      I also had to fix a permissions issue from a while back, that wasn't affecting anything until I went to get this feature to be functional.

    • DustinB3403

      CentOS rsync between servers using keyfile to pass credentials
      IT Discussion • rsync centos7 crontab • • DustinB3403

      44
      0
      Votes
      44
      Posts
      2535
      Views

      travisdh1

      @DustinB3403 said in CentOS rsync between servers using keyfile to pass credentials:

      Nevermind, seems to work when I don't bother telling the system to use the authorized key.

      That IS kinda the idea. ssh just handles that for you, even when called from another program like rsync.

    • matteo nunziati

      Anacron Jobs on a CentOS 7 Server
      IT Discussion • centos centos 7 cron crontab anacron scheduling linux rhel rhel 7 • • matteo nunziati

      28
      2
      Votes
      28
      Posts
      5603
      Views

      scottalanmiller

      @matteo-nunziati said in Anacron Jobs on a CentOS 7 Server:

      @JaredBusch well never considered the workload on servers. I don't know how they manage it! maybe not so many use unattended upgraqdes in debian.

      I definitely feel like Ubuntu users don't keep their systems as up to date 😉

    • S

      Crontab troubleshooting
      IT Discussion • ubuntu 14.04 crontab • • Sparkum

      20
      0
      Votes
      20
      Posts
      2393
      Views

      scottalanmiller

      @Sparkum said in Crontab troubleshooting:

      @scottalanmiller
      Using Ubuntu 14.04

      Oh okay, probably on the legacy system still then. In that case, what you are looking to do is better done with...

      /etc/init.d/servicename status

    • scottalanmiller

      UNIX Scheduling with cron
      IT Discussion • linux unix sam linux administration cron cron job crontab bsd solaris • • scottalanmiller

      15
      8
      Votes
      15
      Posts
      5480
      Views

      A

      Thanks!