Last active
September 23, 2018 19:23
-
-
Save pchittum/8c07c56468a59e2eb900a720bc9ca293 to your computer and use it in GitHub Desktop.
Running a dx command in shell script through cron fails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*/2 * * * * /Users/pchittum/Stuff/git/sfdx-projects/norf/writeapexlog.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PATH=/usr/local/bin:/usr/local/sbin:~/bin:/usr/bin:/bin:/usr/sbin:/sbin | |
#these work ok | |
date >> /Users/pchittum/Stuff/git/sfdx-projects/norf/Test.log | |
echo 'hello again' >> /Users/pchittum/Stuff/git/sfdx-projects/norf/Test.log | |
#this does not | |
concurrent=$(sfdx force:limits:api:display -u blixtar | grep 'Storage') | |
echo "${concurrent}" >> /Users/pchittum/Stuff/git/sfdx-projects/norf/DailyOrgStorage.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So bizarre.
The following works fine:
As does the full path
And the output from ls -al for the .sh and sfdx are as follows