Skip to main content

crontab behaving differently with root and user

Comments

6 comments

  • dalem
    add it like this php -q artisan -----
    0
  • cPanelLauren
    Let us know if the advice provided by @dalem is helpful and if you have any further questions or concerns.
    0
  • Vijayakumar J R
    Hello dalem Thank for your reply We have already added the command php -q artisan ----- we run command php -q artisan it's giving correct output and correct artisan commands. and I set this command in cron jobs for every minute, In cron log file, Its given list of some text and then giving the artisan commands. Please refer to both command-line screenshot and cron log file screenshot. Can you please help with this. Thank you
    0
  • cPanelLauren
    Can you post the cron log file output in code blocks? The screenshot is unreadable.
    0
  • Vijayakumar J R
    Thanks for your reply. If i run as root user php artisan Output: Laravel Framework 6.10.1 Usage: command [options] [arguments] Options: -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug Available commands: cdn Make CDN on or off clear-compiled Remove the compiled class file down Put the application into maintenance mode droptables Drops all tables encryption This update the encryption value from old to AES-256-CBC env Display the current framework environment help Displays help for a command inspire Display an inspiring quote list Lists commands migrate Run the database migrations optimize Cache the framework bootstrap files preset Swap the front-end scaffolding for the application serve Serve the application on the PHP development server testing-setup Creates a testing_db, runs migration and seeder for testing up Bring the application out of maintenance mode activitylog activitylog:clean Clean up old records from the activity log. auth auth:clear-resets Flush expired password reset tokens backup backup:email Send backup completed mail after System backup is finished cache cache:clear Flush the application cache cache:forget Remove an item from the cache cache:table Create a migration for the cache database table config config:cache Create a cache file for faster configuration loading config:clear Remove the configuration cache file contract contract:notification-expiry This will send contract expiry notification by email to selected agents and vendor contract:status-active This will change contract status to active contract:status-expired This will change contract status to expired database database:sync update testing datatables datatables:html Create a new DataTable html class. datatables:make Create a new DataTable service class. datatables:scope Create a new DataTable Scope class. db db:seed Seed the database with records db:wipe Drop all tables, views, and types debugbar debugbar:clear Clear the Debugbar Storage download download:faveo event event:cache Discover and cache the application's events and listeners event:clear Clear all cached events and listeners event:generate Generate the missing events and listeners based on registration event:list List the application's events and listeners faveo faveo:checkupdate Check for system updates faveo:decode faveo:encode horizon horizon:assets Re-publish the Horizon assets horizon:continue Instruct the master supervisor to continue processing jobs horizon:install Install all of the Horizon resources horizon:list List all of the deployed machines horizon:pause Pause the master supervisor horizon:purge Terminate any rogue Horizon processes horizon:snapshot Store a snapshot of the queue metrics horizon:status Get the current status of Horizon horizon:supervisors List all of the supervisors horizon:terminate Terminate the master supervisor so it can be restarted install install:db installing database install:faveo to install faveo install:migrate migration for install install:seed Seeding for install jwt jwt:secret Set the JWTAuth secret key used to sign the tokens key key:generate Set the application key ldap ldap:sync This will import users from LDAP AD server logs logs:delete Will Delete last n days of logs maintenance maintenance:on This command will turn on the application to Maintenance mode make make:channel Create a new channel class make:command Create a new Artisan command make:controller Create a new controller class make:event Create a new event class make:exception Create a new custom exception class make:factory Create a new model factory make:job Create a new job class make:listener Create a new event listener class make:mail Create a new email class make:middleware Create a new middleware class make:migration Create a new migration file make:model Create a new Eloquent model class make:notification Create a new notification class make:observer Create a new observer class make:policy Create a new policy class make:provider Create a new service provider class make:request Create a new form request class make:resource Create a new resource make:rule Create a new validation rule make:seeder Create a new seeder class make:test Create a new test class make:transformer Create a new Transformer Class migrate migrate:fresh Drop all tables and re-run all migrations migrate:install Create the migration repository migrate:refresh Reset and re-run all migrations migrate:reset Rollback all database migrations migrate:rollback Rollback the last database migration migrate:status Show the status of each migration notifications notifications:table Create a migration for the notifications table optimize optimize:clear Remove the cached bootstrap files package package:discover Rebuild the cached package manifest passport passport:client Create a client for issuing access tokens passport:install Run the commands necessary to prepare Passport for use passport:keys Create the encryption keys for API authentication preinsatall preinsatall:check check for the pre installation queue queue:failed List all of the failed queue jobs queue:failed-table Create a migration for the failed queue jobs database table queue:flush Flush all of the failed queue jobs queue:forget Delete a failed queue job queue:listen Listen to a given queue queue:restart Restart queue worker daemons after their current job queue:retry Retry a failed queue job queue:table Create a migration for the queue jobs database table queue:work Start processing jobs on the queue as a daemon remove remove:field removing field from any form builders report report:send Sending the report mail route route:cache Create a route cache file for faster route registration route:clear Remove the route cache file route:list List all registered routes schedule schedule:run Run the scheduled commands send send:escalation To send the escation message when ticket violates SLA session session:table Create a migration for the session database table storage storage:link Create a symbolic link from "public/storage" to "storage/app/public" task task:alert This function handles task alerts task:repeat notifies task alert ticket ticket:close Ticket will close according to workflow ticket:fetch Fetching the tickets from service provider ticket:recur Execute ticket recurring command updater updater:check-for-update Check if a new update is available. vendor vendor:publish Publish any publishable assets from vendor packages view view:cache Compile all of the application's Blade templates view:clear Clear all compiled view files
    If I run web user sudo -u $webuser php artisan Output:- [CODE=php]
    ^ "here"
    
    Laravel Framework 6.10.1 Usage: command [options] [arguments] Options: -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug Available commands: cdn Make CDN on or off clear-compiled Remove the compiled class file down Put the application into maintenance mode droptables Drops all tables encryption This update the encryption value from old to AES-256-CBC env Display the current framework environment help Displays help for a command inspire Display an inspiring quote list Lists commands migrate Run the database migrations optimize Cache the framework bootstrap files preset Swap the front-end scaffolding for the application serve Serve the application on the PHP development server testing-setup Creates a testing_db, runs migration and seeder for testing up Bring the application out of maintenance mode activitylog activitylog:clean Clean up old records from the activity log. auth auth:clear-resets Flush expired password reset tokens backup backup:email Send backup completed mail after System backup is finished cache cache:clear Flush the application cache cache:forget Remove an item from the cache cache:table Create a migration for the cache database table config config:cache Create a cache file for faster configuration loading config:clear Remove the configuration cache file database database:sync update testing datatables datatables:html Create a new DataTable html class. datatables:make Create a new DataTable service class. datatables:scope Create a new DataTable Scope class. db db:seed Seed the database with records db:wipe Drop all tables, views, and types debugbar debugbar:clear Clear the Debugbar Storage download download:faveo event event:cache Discover and cache the application's events and listeners event:clear Clear all cached events and listeners event:generate Generate the missing events and listeners based on registration event:list List the application's events and listeners faveo faveo:checkupdate Check for system updates faveo:decode faveo:encode horizon horizon:snapshot Store a snapshot of the queue metrics install install:db installing database install:faveo to install faveo install:migrate migration for install install:seed Seeding for install jwt jwt:secret Set the JWTAuth secret key used to sign the tokens key key:generate Set the application key logs logs:delete Will Delete last n days of logs maintenance maintenance:on This command will turn on the application to Maintenance mode make make:channel Create a new channel class make:command Create a new Artisan command make:controller Create a new controller class make:event Create a new event class make:exception Create a new custom exception class make:factory Create a new model factory make:job Create a new job class make:listener Create a new event listener class make:mail Create a new email class make:middleware Create a new middleware class make:migration Create a new migration file make:model Create a new Eloquent model class make:notification Create a new notification class make:observer Create a new observer class make:policy Create a new policy class make:provider Create a new service provider class make:request Create a new form request class make:resource Create a new resource make:rule Create a new validation rule make:seeder Create a new seeder class make:test Create a new test class make:transformer Create a new Transformer Class migrate migrate:fresh Drop all tables and re-run all migrations migrate:install Create the migration repository migrate:refresh Reset and re-run all migrations migrate:reset Rollback all database migrations migrate:rollback Rollback the last database migration migrate:status Show the status of each migration notifications notifications:table Create a migration for the notifications table optimize optimize:clear Remove the cached bootstrap files package package:discover Rebuild the cached package manifest passport passport:client Create a client for issuing access tokens passport:install Run the commands necessary to prepare Passport for use passport:keys Create the encryption keys for API authentication preinsatall preinsatall:check check for the pre installation queue queue:failed List all of the failed queue jobs queue:failed-table Create a migration for the failed queue jobs database table queue:flush Flush all of the failed queue jobs queue:forget Delete a failed queue job queue:listen Listen to a given queue queue:restart Restart queue worker daemons after their current job queue:retry Retry a failed queue job queue:table Create a migration for the queue jobs database table queue:work Start processing jobs on the queue as a daemon remove remove:field removing field from any form builders report report:send Sending the report mail route route:cache Create a route cache file for faster route registration route:clear Remove the route cache file route:list List all registered routes schedule schedule:run Run the scheduled commands send send:escalation To send the escation message when ticket violates SLA session session:table Create a migration for the session database table storage storage:link Create a symbolic link from "public/storage" to "storage/app/public" task task:alert This function handles task alerts task:repeat notifies task alert ticket ticket:close Ticket will close according to workflow ticket:fetch Fetching the tickets from service provider ticket:recur Execute ticket recurring command updater updater:check-for-update Check if a new update is available. vendor vendor:publish Publish any publishable assets from vendor packages view view:cache Compile all of the application's Blade templates view:clear Clear all compiled view files
    Thank you Awaiting for your reply
    0
  • Vijayakumar J R
    Awaiting for your valuable reply. Thank you
    0

Please sign in to leave a comment.