perlbrew and cron

	After moving to a VPS, I'm finally able to use perlbrew to use =
the latest perl, but it's not working the same as it does on my Mac.

	In terminal, I can call a perl script with either the full path =
to perl or with an alias I've set up in .bashrc.  So far, so good.  =
However, to run a script with cron, I can't seem to get it to run with =
the perlbrew version.  I've even tried it with just the path to the =
script, as mentioned by ikegami here:

=
https://stackoverflow.com/questions/47457834/running-a-perl-script-from-cr=
ontab-when-you-use-perlbrew

	Unfortunately, I don't have anymore to go on than this as, =
literally, nothing happens - the script doesn't get run and I don't get =
an error email from cron, so I don't know where to look.

Thanks,
Frank=
0
perl
12/7/2017 6:38:02 PM
perl.beginners 29264 articles. 3 followers. Follow

2 Replies
4 Views

Similar Articles

[PageSpeed] 42

--f403045ecfde4b60bf055fc4968a
Content-Type: text/plain; charset="UTF-8"

You have to make sure that the cron job has the right path.  Usually it can
be as easy as calling a wrapper script that sets up the correct environment.

On Thu, Dec 7, 2017 at 1:38 PM, SSC_perl <perl@surfshopcart.com> wrote:

>         After moving to a VPS, I'm finally able to use perlbrew to use the
> latest perl, but it's not working the same as it does on my Mac.
>
>         In terminal, I can call a perl script with either the full path to
> perl or with an alias I've set up in .bashrc.  So far, so good.  However,
> to run a script with cron, I can't seem to get it to run with the perlbrew
> version.  I've even tried it with just the path to the script, as mentioned
> by ikegami here:
>
> https://stackoverflow.com/questions/47457834/running-a-
> perl-script-from-crontab-when-you-use-perlbrew
>
>         Unfortunately, I don't have anymore to go on than this as,
> literally, nothing happens - the script doesn't get run and I don't get an
> error email from cron, so I don't know where to look.
>
> Thanks,
> Frank
> --
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
> http://learn.perl.org/
>
>
>

--f403045ecfde4b60bf055fc4968a
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">You have to make sure that the cron job has the right path=
..=C2=A0 Usually it can be as easy as calling a wrapper script that sets up =
the correct environment.</div><div class=3D"gmail_extra"><br><div class=3D"=
gmail_quote">On Thu, Dec 7, 2017 at 1:38 PM, SSC_perl <span dir=3D"ltr">&lt=
;<a href=3D"mailto:perl@surfshopcart.com" target=3D"_blank">perl@surfshopca=
rt.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"=
margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 After moving to a VPS, I&#39;m finally able to use perlbr=
ew to use the latest perl, but it&#39;s not working the same as it does on =
my Mac.<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 In terminal, I can call a perl script with eith=
er the full path to perl or with an alias I&#39;ve set up in .bashrc.=C2=A0=
 So far, so good.=C2=A0 However, to run a script with cron, I can&#39;t see=
m to get it to run with the perlbrew version.=C2=A0 I&#39;ve even tried it =
with just the path to the script, as mentioned by ikegami here:<br>
<br>
<a href=3D"https://stackoverflow.com/questions/47457834/running-a-perl-scri=
pt-from-crontab-when-you-use-perlbrew" rel=3D"noreferrer" target=3D"_blank"=
>https://stackoverflow.com/<wbr>questions/47457834/running-a-<wbr>perl-scri=
pt-from-crontab-when-<wbr>you-use-perlbrew</a><br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Unfortunately, I don&#39;t have anymore to go o=
n than this as, literally, nothing happens - the script doesn&#39;t get run=
 and I don&#39;t get an error email from cron, so I don&#39;t know where to=
 look.<br>
<br>
Thanks,<br>
Frank<br>
<span class=3D"HOEnZb"><font color=3D"#888888">--<br>
To unsubscribe, e-mail: <a href=3D"mailto:beginners-unsubscribe@perl.org">b=
eginners-unsubscribe@perl.org</a><br>
For additional commands, e-mail: <a href=3D"mailto:beginners-help@perl.org"=
>beginners-help@perl.org</a><br>
<a href=3D"http://learn.perl.org/" rel=3D"noreferrer" target=3D"_blank">htt=
p://learn.perl.org/</a><br>
<br>
<br>
</font></span></blockquote></div><br></div>

--f403045ecfde4b60bf055fc4968a--
0
chris
12/7/2017 6:53:42 PM
--001a113d60dc543305055fc564df
Content-Type: text/plain; charset="UTF-8"

0 23  * * * /path/to/perlbrew exec --with perl-5.20.0 perl /path/to/app.pl


On Thu, Dec 7, 2017 at 10:38 AM, SSC_perl <perl@surfshopcart.com> wrote:

>         After moving to a VPS, I'm finally able to use perlbrew to use the
> latest perl, but it's not working the same as it does on my Mac.
>
>         In terminal, I can call a perl script with either the full path to
> perl or with an alias I've set up in .bashrc.  So far, so good.  However,
> to run a script with cron, I can't seem to get it to run with the perlbrew
> version.  I've even tried it with just the path to the script, as mentioned
> by ikegami here:
>
> https://stackoverflow.com/questions/47457834/running-a-
> perl-script-from-crontab-when-you-use-perlbrew
>
>         Unfortunately, I don't have anymore to go on than this as,
> literally, nothing happens - the script doesn't get run and I don't get an
> error email from cron, so I don't know where to look.
>
> Thanks,
> Frank
> --
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
> http://learn.perl.org/
>
>
>

--001a113d60dc543305055fc564df
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><pre class=3D"gmail-highlight" style=3D"margin-top:0px;mar=
gin-bottom:10px;box-sizing:border-box;overflow:auto;font-family:Menlo,Monac=
o,Consolas,&quot;Courier New&quot;,monospace;font-size:15px;padding:8px 12p=
x;line-height:1.42857;color:rgb(51,51,51);word-break:break-all;word-wrap:br=
eak-word;background:rgb(247,247,247);border:0px solid rgb(213,213,233);bord=
er-radius:3px"><code style=3D"margin:0px;box-sizing:border-box;font-family:=
Menlo,Monaco,Consolas,&quot;Courier New&quot;,monospace;padding:1px 0px;col=
or:inherit;border-radius:3px;white-space:pre-wrap;border:none">0 23  <span =
class=3D"gmail-k" style=3D"margin:0px;box-sizing:border-box;font-weight:bol=
d">*</span> <span class=3D"gmail-k" style=3D"margin:0px;box-sizing:border-b=
ox;font-weight:bold">*</span> <span class=3D"gmail-k" style=3D"margin:0px;b=
ox-sizing:border-box;font-weight:bold">*</span> /path/to/perlbrew <span cla=
ss=3D"gmail-nb" style=3D"margin:0px;box-sizing:border-box;color:rgb(0,134,1=
79)">exec</span> --with perl-5.20.0 perl /path/to/<a href=3D"http://app.pl"=
>app.pl</a> </code></pre></div><div class=3D"gmail_extra"><br><div class=3D=
"gmail_quote">On Thu, Dec 7, 2017 at 10:38 AM, SSC_perl <span dir=3D"ltr">&=
lt;<a href=3D"mailto:perl@surfshopcart.com" target=3D"_blank">perl@surfshop=
cart.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 After moving to a VPS, I&#39;m finally able to use per=
lbrew to use the latest perl, but it&#39;s not working the same as it does =
on my Mac.<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 In terminal, I can call a perl script with eith=
er the full path to perl or with an alias I&#39;ve set up in .bashrc.=C2=A0=
 So far, so good.=C2=A0 However, to run a script with cron, I can&#39;t see=
m to get it to run with the perlbrew version.=C2=A0 I&#39;ve even tried it =
with just the path to the script, as mentioned by ikegami here:<br>
<br>
<a href=3D"https://stackoverflow.com/questions/47457834/running-a-perl-scri=
pt-from-crontab-when-you-use-perlbrew" rel=3D"noreferrer" target=3D"_blank"=
>https://stackoverflow.com/<wbr>questions/47457834/running-a-<wbr>perl-scri=
pt-from-crontab-when-<wbr>you-use-perlbrew</a><br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Unfortunately, I don&#39;t have anymore to go o=
n than this as, literally, nothing happens - the script doesn&#39;t get run=
 and I don&#39;t get an error email from cron, so I don&#39;t know where to=
 look.<br>
<br>
Thanks,<br>
Frank<br>
<span class=3D"HOEnZb"><font color=3D"#888888">--<br>
To unsubscribe, e-mail: <a href=3D"mailto:beginners-unsubscribe@perl.org">b=
eginners-unsubscribe@perl.org</a><br>
For additional commands, e-mail: <a href=3D"mailto:beginners-help@perl.org"=
>beginners-help@perl.org</a><br>
<a href=3D"http://learn.perl.org/" rel=3D"noreferrer" target=3D"_blank">htt=
p://learn.perl.org/</a><br>
<br>
<br>
</font></span></blockquote></div><br></div>

--001a113d60dc543305055fc564df--
0
echowuhao
12/7/2017 7:51:19 PM
Reply: