Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

execute cron.daily

add cronjob
* * * * *   /usr/bin/env > /home/username/tmp/cron-env

vi run-as-cron:
#!/bin/bash
/usr/bin/env -i $(cat /home/username/tmp/cron-env) "$@"

then run:
run-as-cron /the/problematic/script --with arguments --and parameters
Source by unix.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #execute
ADD COMMENT
Topic
Name
3+8 =