cron

  1. A

    How to launch script on First Saturday and two day before

    Good morning all, read several posts that this can't be done, but maybe someone has accomplished anyway. What I need is to launch a script on the First Saturday of every month and two days before. For example first Saturday of December 2023 will happen on the second, I'd like my script to be...
  2. D

    Cron job not running successfully

    Hi Guys, Apologies if this question is silly, but I am relatively new Linux and I'm having issues getting my cron job to run. My Cron job is as follows: 22 11 * * THU sudo su - nz /nz/support/bin/nz_genstats DBNAME -schema SCHEMANAME > FILENAME.log The cron job does not seem to run...
  3. B

    Cron task doesn't erase directory

    Hi there. I have a php script which creates a temp directory. Then makes other stuff and finally removes the temp directory. If I run the script with user root directly in the CLI, everything works fine. However, the cron task throws an error while trying to delete the temp directory. Crontab...
  4. SpongeB0B

    output file only when STDERR exist.

    Hi everyone, I created a cron job trough crontab -e and it work line in the crontab : * * * * * myscript.sh 2>>/home/me/Desktop/errors.txt But I have a small bug, every-time it run, it generate the errors.txt (nothing inside) is there a way to generate this file only if indeed there is an...
  5. SpongeB0B

    [Solved] Launch command once at login per user.

    Hi everyone, When I create an user ( useradd ) I would like to create a command to run only once for the user when he login for the first time. First I was thinking about ~/.profile but I don't like it because the command will stay forever in the file.. and if I use a solution like...
  6. D

    [crontab][not-working]command='redshift':

    Hello, I use a dummy script at '/bin/rdshft.bash' for a single shot applying of 'redshift' command with its options, the content of the command 'rdshft.bash' is: #!/bin/bash redshift -v -P -l 28.00:78.00 -t 3200:2400 So, yesterday I decided to add the 'rdshft.bash' to the crontab for automatic...
  7. A

    Cron Jobs / Crontab - Cannot Create or Edit File

    I try to edit the crontab file to create con jobs by using ssh "sudo crontab -e" and "crontab -e", but I keep getting the following error message (or as shown in the image below): And the file path location "/var/spool/cron/crontabs/" folder is empty. Shouldn't there be a cron file of some...
  8. Nemesis

    Cron runs a non-existing variant of . sh script

    I've been encountered a strange phenomena. I've been messing with Cron, so it runs a script called startup.sh, which it does. First I wrote the script to send an email, but later I rewrote it to send a message instead. However, when restarting the server, nothing happened. Then I checked the...
  9. V

    I had an issue recently. Wanting to monitor cron jobs in real-time. Looking for some feedback and/or suggestions please!

    Hey guys, I have an issue currently where I've got a cron job set to run at midnight each day to reset daily API requests for a service that I run. The job failed recently which caused me a whole bunch of headaches and I've been trying to find a solution to monitor all of my cron jobs so I...
  10. D

    Troubles with crontab

    Hi guys, I would say I'm a very n00 n00b to linux in general and I'm currently scratching my head rather vigorously (and have been for the last 3 hours) about crontab. Here's my setup (probably completely irrelevant but hey): I have an old desktop PC (a box with a brain) whose sole purpose is...
Top