[ALUG] Setting Crons on FreeBSD
Hamisi Jabe
administrator at banana.co.tz
Tue Aug 4 18:46:40 EAT 2015
Dear Ismail,
Let me try this
Additionally why not just use sh
*/*30 * * * * /bin/sh /etc/rsync.sh
* and see the results
Actually when i check on the cron logs i see the below line
Aug 4 21:10:00 mx3 /usr/sbin/cron[13063]: (root) CMD ( ^Ibash
/etc/rsync.sh)
but nothing is happening in really sense
Thanks*
*
On 04/08/2015 06:36 alasiri, Ismail Settenda via Linux wrote:
> Hello's
>
> */*30 * * * * /usr/local/bin/bash /etc/rsync.sh -- * sounds about
> right but your explanation there after kidogo seems inconsistent.
>
> */30 and 30 would mean the same thing for the first portion ....i.e.
> to run every 30th minute of the hour or to run every 30 minutes result
> in the same answer cause half of the hour is 30 mins but is very
> different use another figure.
>
> */2*0 * * * * or *2*0 * * * * the first now means *to run at
> intervals of 20 minute of the hour and *the second* to run at 20th
> minute of ever hour. The first will run 3 times in an hour whereas the
> second will run only once in an hour.
>
> Now I would suspect your problem is more with the second portion of
> the command (/am assuming you running this as root/).
>
> * /usr/local/bin/bash ....two things ..can you confirm this is the
> right path to the bash command by say*
> *
> *
> *ls ** /usr/local/bin/bash*
> *
> *
> *or do you really need it and re-write the cron command as :*
> *
> *
> */*30 * * * * /etc/rsync.sh*
> which is the same as
> *30 * * * * /etc/rsync.sh*
> *
> *
> Additionally why not just use sh
> */*30 * * * * /bin/sh /etc/rsync.sh*
>
> Regards
>
> --
> Ismail
>
> On 4 August 2015 at 17:45, Seta Magabe via Linux
> <linux at lists.habari.co.tz <mailto:linux at lists.habari.co.tz>> wrote:
>
> Oh yes do you have any errors or why don't you just send the
> output of it while running to see what's happening like pipe it
> somewhere i am using this to get my daily pbx Report when ever
> something goes wrong i see it on my log file at the end "27 17 * *
> * root /bin/bash -l -c 'cd /var/log/asterisk/daily-pbx-report/ &&
> (date && ./daily.sh) >> daily-script.log 2>&1' "
>
> On Tue, Aug 4, 2015 at 5:17 PM, Hamisi Jabe
> <administrator at banana.co.tz <mailto:administrator at banana.co.tz>>
> wrote:
>
> The start symbolizes every 20 minutes
>
>
>
>
> On 04/08/2015 05:15 alasiri, Seta Magabe wrote:
>> I think you should remove that star in the beginning of your
>> command try this /*30 * * * * /usr/local/bin/bash
>> /etc/rsync.sh *
>> and not */*30 * * * * /usr/local/bin/bash /etc/rsync.sh*
>>
>> Thanks
>>
>> On Tue, Aug 4, 2015 at 4:51 PM, Hamisi Jabe via Linux
>> <linux at lists.habari.co.tz <mailto:linux at lists.habari.co.tz>>
>> wrote:
>>
>> Dear All,
>>
>> Hope everyone is doing on fine,
>>
>> I am trying to set crons on Freebsd to run a script but
>> its not executing though when i run the script directly
>> it is running properlly from start to end
>>
>> Please help
>>
>> script directory without the quotes
>> "*/etc/rsync.sh*"
>>
>> cron job command without the quotes "*/*30 * * * *
>> /usr/local/bin/bash /etc/rsync.sh*"
>>
>>
>>
>> Any help please
>>
>>
>> Thanks
>>
>> _______________________________________________
>> The Arusha Linux User Group: http://unix.or.tz
>> Linux mailing list
>> Linux at lists.habari.co.tz <mailto:Linux at lists.habari.co.tz>
>> http://lists.habari.co.tz/cgi-bin/mailman/listinfo/linux
>>
>> The Arusha LUG mailing list is generously hosted by
>> Habari Node Ltd: http://www.habari.co.tz/
>>
>> The above comments and data are owned by whoever posted
>> them (including attachments if any). The mailing list
>> host is not responsible for them in any way.
>>
>>
>>
>>
>> --
>> Seta James Magabe
>> Mobile:+255713 529260 <tel:%2B255713%20529260> /
>> +255766844260 <tel:255766844260>
>> E-mail: setama2001 at gmail.com <mailto:setama2001 at gmail.com>
>> Skype: magabe.seta
>>
>
>
>
>
> --
> Seta James Magabe
> Mobile:+255713 529260 <tel:%2B255713%20529260> / +255766844260
> <tel:255766844260>
> E-mail: setama2001 at gmail.com <mailto:setama2001 at gmail.com>
> Skype: magabe.seta
>
>
> _______________________________________________
> The Arusha Linux User Group: http://unix.or.tz
> Linux mailing list
> Linux at lists.habari.co.tz <mailto:Linux at lists.habari.co.tz>
> http://lists.habari.co.tz/cgi-bin/mailman/listinfo/linux
>
> The Arusha LUG mailing list is generously hosted by Habari Node
> Ltd: http://www.habari.co.tz/
>
> The above comments and data are owned by whoever posted them
> (including attachments if any). The mailing list host is not
> responsible for them in any way.
>
>
>
>
> _______________________________________________
> The Arusha Linux User Group: http://unix.or.tz
> Linux mailing list
> Linux at lists.habari.co.tz
> http://lists.habari.co.tz/cgi-bin/mailman/listinfo/linux
>
> The Arusha LUG mailing list is generously hosted by Habari Node Ltd: http://www.habari.co.tz/
>
> The above comments and data are owned by whoever posted them (including attachments if any). The mailing list host is not responsible for them in any way.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.habari.co.tz/pipermail/linux/attachments/20150804/9b8c68ec/attachment-0001.html>
More information about the Linux
mailing list