Re: Query regarding cron jobs



Ankit Mahawar wrote:

The script is getting executed a few times when scheduled through cron

The probability of successful execution is 6/10.

How long does it run? Are you sure that one isn't running so long that
cron doesn't start the next?
<snip>
Are you using complete paths in your script? Your path in an interactive
shell and the one supplied by cron may be different.

Path is from the root dir.

Do you mean /, or /root/? Put an env statement in the script, and have
that print it to a file, then examine your paths.
<snip>
How can we print the entries in /etc/cron.d through commnad line as it
not showing any entries crontab -l as the entry in /etc/cron.d is for
root user .

You clearly don't understand what we're asking/telling you. I've never
used cron.d; either I set up a cron job via crontab - and you can *allow*
or disallow any user from having a crontab, or it's in /etc/cron.hourly,
/etc/cron.daily, /etc/cron.weekly, or /etc/cron.monthly.

mark "and the pipe sign - "|", means "or""

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



Relevant Pages

  • Re: Query regarding cron jobs
    ... Second, man cron, crontab, crontab ... The script is getting executed a few times when scheduled through cron ... root user. ... and/or attachments to it are strictly prohibited. ...
    (RedHat)
  • Odd cron-related problem.
    ... I have a script that does some maint functions on an sql database. ... When I call it from the command line of the root user id, ... When called from cron under root, ...
    (comp.lang.tcl)
  • Re: Query regarding cron jobs
    ... The script is getting executed a few times when scheduled through cron ... The probability of successful execution is 6/10. ... showing any entries crontab -l as the entry in /etc/cron.d is for root ...
    (RedHat)
  • Re: Query regarding cron jobs
    ... The script is getting executed a few times when scheduled through cron ... The probability of successful execution is 6/10. ... showing any entries crontab -l as the entry in /etc/cron.d is for root ...
    (RedHat)
  • SUMMARY: cron entry: nth day of every month?
    ... cron can not handle this with its own syntax. ... 21st but "command" only runs if the output of the "date" command ... What I would suggest is rather than embedding the logic in each script ... The answer is it is _not_ possible to control it only with crontab ...
    (Tru64-UNIX-Managers)