From my understanding you can write your crons by editing
crontab -e
I've found several sources that instead refer to a bash script in the cron job, rather than writing a job line for line.
Is the only benefit that you can consolidate many tasks into one cron job using a bash script?
Additional question for a newbie: Editing crontab -e refers to one file correct?
That is not a script, so putting it in /etc/cron.hourly will not work.I suggest you read the crontab manuals.man crontabman 5 crontabAs root, run 'crontab -... [by gerald_clark]
I have a strange thing (i think),
I added a line in my crontab on an QNAP NAS with crontab -e i saved (:wq!)
This line would have had a script to run for every 5 minutes so i dit 5 * * * * and the script name.
And restarted the crontab.
This script fills a database.
Last night i quit trying, went to bed and kept de NAS running.
And wen ik woke up this morning i looked at the database and the scr
Hi,
script has been defined which take the user input for minute,hour,day of month, month and day of week.
Now, how to append the below cron entry to the crontab file ?
0 11 1 7 2 /oracle/oradata/iprsdb/dba_scripts/install_cron_export_gps.sh
which is the main file for crontab on solaris & what is its default location where which we can append the cron entries ?
With Regards
I have written 7 scripts all together into 1 script called runall.sh in my /home/student directory.
I want to use crontab to run this script every day at night (11:00 PM).
I have tried the following using crontab -e:
PATH=/home/student
00 23 * * * /home/student/runall.sh >> /var/log/script_output.log 2>&1
I have also tried putting this in /etc/crontab like this:
SHELL=/bin/sh
PAT
My crontab looks something like this;
1 * * * * /var/www/cron/site1.sh > /dev/null 2>&1
0 * * * * /var/www/cron/site2.sh > /dev/null 2>&1
3 * * * * /var/www/cron/site3.sh > /dev/null 2>&1
This works great and lets me place all the nasty little script calls into one place, rather than making crontab harder to read than it already is.
But, this fails massively whe
I was learning and experimenting with crontab today.
The default editor was just too difficult for me to figure out which caused me to remove my crontab by running crontab -r.
Now, when I run crontab -e and input my new cron task, nothing happens.
I suspect it's the crontab -r command I executed earlier.
Can anyone help, please?
Hi guys!
Consider the following PERL script,
Code:
#!/usr/bin/perl
my $userID = `whoami`;
open(TMP, ">user.txt");
print TMP "$userID";
close(TMP);
Run on the command line it works no problem.
Run using crontab it doesn't work.
Where do I go to check errors from crontab?
I've read things about the cron ENVIRONMENT which I don't understand.
Could someone
Hi,
Im trying to run script A which requires path /sbin.
I have a crontab entry to run script A every 10 minutes.
Script A is executed fine by cron, but because script A requires /sbin in its path it fails to run.
My situation is script A get overwritten from time to time so I can't modify script A to set path in there.
So my question is...