i have perl script using scrapes data , saves sqlite db laravel project. have verified script works.
i setting scheduled task run every day [so db has latest information].
my question - should put perl script within laravel project directory, , following that, how call script using laravel's task scheduling?
note: note, aware shouldn't mixing languages within laravel project, working under time constraint hackathon, making use of time works. trying hack works...
i.e. can create subdirectory, let's scripts, in laravel's storage directory , put perl script(s) in there.
then can schedule execution this
$schedule->exec('/usr/bin/perl '.storage_path('scripts/myscript.pl')) ->daily() ->at('09:00');
Comments
Post a Comment