Tag Info

New answers tagged

2

The manpage (man 5 crontab) says: The entire command portion of the line, up to a newline or % character, will be executed by /bin/sh or by the shell specified in the SHELL variable of the crontab file. Percent-signs (%) in the command, unless escaped with backslash (), will be changed into newline characters, and all data after the ...


0

You can use this command find /path/to/dir -maxdepth 0 -ctime +1 -exec rm -fr {} + i.e 1 0 * * * find /path/to/dir -maxdepth 0 -ctime +1 -exec rm -fr {} + Credit Goes Here


1

As indicated by other answers, the result depends on whether anacron is installed. On a desktop, it is installed by default, BUT crucially it is not installed in the server distribution. So the answer is around 06:25 on a server and about 07:35 on a desktop.


0

Not really a solution in the end, I'm still bemused as to where this weird extension came from but grep 'peacjson' -R /etc/php5 found the ini file that was asking for it which I uncommented so the error messages went away, but still how it got there and what it was remains a mystery.


1

You didn't post the actual name of the script you are trying tun run, but chances are it contains a dot ('.'), like if it is ending in '.sh'. run-parts will not run scripts which contain anything else but alphanumerical characters or hyphens. Remove the dot and you are fine.


1

Cron usually needs a full file path try using 0 1 * * * /sbin/reboot instead


1

When you are in the directory ~/test/basic_unix and invoke your script, your mkdir "$createdep" command creates that folder in ~/test/basic_unix because that's the current directory, that's where you ran the script from. However, when you run that script from cron, the directory you start with is your home directory, ~, so your mkdir command creates the ...


0

We encounter the same problem with one VPS server which is hosted at a provider using OpenVZ (https://openvz.org). Another server with fresh 14.04 install (hosted elsewhere) has all cron jobs enabled. My best guess is that it is a try of the provider to save some system resources.


0

Since the scheduled tasks needs a command, and apparently simply visiting the URL is all that's needed, you can use a program which will fetch that URL: wget http//www.mysiteserverA.com/run.php This actually downloads the response from that page (to somewhere, I'm not sure where the scheduler sets the working directory to). To suppress this, and any other ...


2

No. From man logrotate: Each configuration file can set global options (local definitions override global ones, and later definitions override earlier ones) So, yes. Again, from the manpage: hourly Log files are rotated every hour. Note that usually logrotate is configured to be run by cron daily. You have to change this ...


0

Your crontab editor has been switched to ed exit ed use the 'q'+ [enter] this will quit the ed editor. If you would like to change your crontab editor back to nano use sudo select-editor This also might be helpful env EDITOR=nano crontab -e


0

System Cron jobs are listed in /etc/crontab file. Therefore editing this file directly will help you out to run the reboot command as root. therefore, $ sudo vi /etc/crontab # Example of job definition: # .---------------- minute (0 - 59) # | .------------- hour (0 - 23) # | | .---------- day of month (1 - 31) # | | | .------- month (1 - 12) OR ...


1

I have three solution suggestions for you. Invoke the crontab with crontab -e -u root Make sure that you have an empty line at the end of the cronjob file, meaning that every line ends with a newline. You might need to redirect the output to devnull: shutdown -r now > /dev/null Here are two helpful webpages for cronjobs: CRON Tester CRON Generator ...


-2

36 17 * * * etc .. 36 17 is not a way to specify the right time in your cron. check via date command to see if your system is working in US time or Europ time use 17 36 if europ time and if your system use 24 H time or 5 36 if your system use US TIME and 12 H time



Top 50 recent answers are included