Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

cron

A basic Bash script (to start a GUI program) works partially in cron

August 7, 2022 by Magenaut

I use this script to restart Firefox overnight (to apply the package manager and addon updates):

Categories Q&A, Unix & Linux Tags bash, cron, firefox, gui Leave a comment

Is it true that “cron.daily runs anacron everyhour”?

August 7, 2022 by Magenaut

On Ubuntu, what is the calling relation between cron and anacron?
I am confused by looking at /etc/anacrontab, /etc/cron.daily/0anacron and /etc/crontab.

Categories Q&A, Unix & Linux Tags anacron, cron Leave a comment

Check if script is started by cron, rather than invoked manually

August 7, 2022 by Magenaut

Is there any variable that cron sets when it runs a program ? If the script is run by cron, I would like to skip some parts; otherwise invoke those parts.

Categories Q&A, Unix & Linux Tags bash, cron, scripting, shell Leave a comment

Cron only occasionally sends e-mail on output and errors

August 7, 2022 by Magenaut

On Debian 8.1, I’m using a Bash feature to detect whether the stackoverflow.com website is reachable:

Categories Q&A, Unix & Linux Tags bash, cron, debian, linux, shell Leave a comment

How can get a list of all scheduled cron jobs on my machine?

August 7, 2022 by Magenaut

My sysadmin has set up a bunch of cron jobs on my machine. I’d like to know exactly what is scheduled for what time. How can I get that list?

Categories Q&A, Unix & Linux Tags cron, linux, scheduling Leave a comment

how can I make cron run a job right now, for testing/debugging? without changing the schedule!

August 7, 2022 by Magenaut

I have a cron job that is scheduled to run everyday, other than changing the schedule, is there any other way to do a test run of the command right now to see if it works as intended?

Categories Q&A, Unix & Linux Tags cron, debugging Leave a comment

Recover cron jobs accidently removed with crontab -r

August 7, 2022 by Magenaut

I entered crontab -r instead of crontab -e and all my cron jobs have been removed.

Categories Q&A, Unix & Linux Tags cron, linux Leave a comment

Cron job to delete files older than 3 days

August 7, 2022 by Magenaut

I need to remove files older than 3 days with a cron job in 3 different directories. (these 3 directories are children of a parent directory /a/b/c/1 & /a/b/c/2 & /a/b/c/3) Can this be done with one line in the crontab?

Categories Q&A, Unix & Linux Tags cron, files, rm, shell-script, timestamps Leave a comment

Does systemd timer unit skip the next run if the process hasn’t finished yet?

August 7, 2022 by Magenaut

I want to use systemd to run a command every 5 minutes. However, there is a risk that occasionally the task may take longer than 5 minutes to run. At that point, will systemd start a second instance of the command i.e. will I end up with 2 processes running?

Categories Q&A, Unix & Linux Tags cron, systemd Leave a comment

Does RHEL/CentOS execute all cronjob files under /etc/cron.d/*, or just some of them?

August 7, 2022 by Magenaut

This is a Red Hat Enterprise Linux 5 system (RHEL). We manage this system using CFengine.

Categories Q&A, Unix & Linux Tags cron, rhel Leave a comment
Older posts
Newer posts
← Previous Page1 … Page4 Page5 Page6 Page7 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress