#! - notify company if a borrowed worker contract is ended : rate the worker performance
if ps aux | grep companynotification-wokerrating | grep -v grep ; then
    exit 0
else
    cd "$1" && php artisan companynotification-wokerrating:cron & >> "$1/cron/logs.log" 2>&1
    exit 0
fi

#! - if search data date_to is already on the past. Removed it
if ps aux | grep search-removepastdates | grep -v grep ; then
    exit 0
else
    cd "$1" && php artisan search-removepastdates:cron & >> "$1/cron/logs.log" 2>&1
    exit 0
fi

#! - run laravel task scheduling
cd "$1" && php artisan schedule:run & >> "$1/cron/logs.log" 2>&1